Hi,
PLease can anyone tell me why the following code won't work:
dim rs as recordset
set rs = Me.RecordsetClone
rs.FindFirst "TestDate = " & Me!txtFormDate
TestDate: a field in a table of date type
txtFormDate: a text box in a form bound to a field in a table of date type
There is a record in the table with TestDate = 11/10/02 and my form field has 11/10/02 entered.
So rs.nomatch should be false! But it comes out as true.
However the following does work:
dim rs as recordset
set rs = Me.RecordsetClone
rs.MoveLast '** i.e. to record that i know has TestDat =11/10/02
If rs!TestDate = me!txtFormDate then
MsgBox "This does work"
End If
So in the first bit of code the match is NOT found, but in the second bit is IS found.
How can I make the first bit of code work.
Thansk for any help
Tracy
PLease can anyone tell me why the following code won't work:
dim rs as recordset
set rs = Me.RecordsetClone
rs.FindFirst "TestDate = " & Me!txtFormDate
TestDate: a field in a table of date type
txtFormDate: a text box in a form bound to a field in a table of date type
There is a record in the table with TestDate = 11/10/02 and my form field has 11/10/02 entered.
So rs.nomatch should be false! But it comes out as true.
However the following does work:
dim rs as recordset
set rs = Me.RecordsetClone
rs.MoveLast '** i.e. to record that i know has TestDat =11/10/02
If rs!TestDate = me!txtFormDate then
MsgBox "This does work"
End If
So in the first bit of code the match is NOT found, but in the second bit is IS found.
How can I make the first bit of code work.
Thansk for any help
Tracy