Hello
I have one visual basic date problem
I am deleloping one simple programme. I need using query to fetch record
Table name : Collection (Access Table)
Fields Data Type
Transid Autonumber
Lno Text
Day Number
Cname Text
Date Date/Time format =(short format)
amt_received number
Now i need a query to tech record using date and lno
In programme i use following coding
In form in using date picker to check value (date format in date picket 16/11/07)
date/month/year
one text box to get lno
Private Sub txtlno_LostFocus()
Set rs4 = New ADODB.Recordset
sql = "select * from collection where date = " & dtpdate.value & " and lno ='" & txtlno.text &
"' "
rs4.Open sql, CN, adOpenStatic, adLockPessimistic
If rs4.RecordCount > 0 Then
sdate = rs4(4).Value
MsgBox ("This Loan Number Already entered")
txtlno.SetFocus
End If
End Sub
the above coding not working because of date value not working well please help to fetch records
using above query


