I am trying to search for a date in a recordset. I currently have:
Dim Rst As Recordset
Dim Db As Database
Dim DtFcDate As Date
Set Db = CurrentDb()
DtFcDate = TxtFunctionDate.Value
Set Rst = Db.OpenRecordset("SELECT * FROM Tbl_Enquiries WHERE [Date of Function]=#" & DtFcDate & "#")
If Rst.RecordCount = 0 Then
...etc
This works fine for me except that it doesn't find the first record in the recordset. I don't know why. It a date "08/02/09" but it won't find it, but will find all others in the recordset. This is very peculiar to me. Any suggestions?
Thanks in advance for your time,
Eric
The greatest risk, is not taking one.
Dim Rst As Recordset
Dim Db As Database
Dim DtFcDate As Date
Set Db = CurrentDb()
DtFcDate = TxtFunctionDate.Value
Set Rst = Db.OpenRecordset("SELECT * FROM Tbl_Enquiries WHERE [Date of Function]=#" & DtFcDate & "#")
If Rst.RecordCount = 0 Then
...etc
This works fine for me except that it doesn't find the first record in the recordset. I don't know why. It a date "08/02/09" but it won't find it, but will find all others in the recordset. This is very peculiar to me. Any suggestions?
Thanks in advance for your time,
Eric
The greatest risk, is not taking one.