Hi folks, I have a problem with a date lookup in an SQL statement. Basically I have a date field in a query, I'm using the findfirst method
recordset.findfirst "Date = #" & formatdatetime(datestring, vblongdate) & "#"
this worked fine on one computer, upon moving my database to another computer I got error 3077 "syntax error in date in expression" I changed the date type to vbgeneraldate and the code works fine. Why is there a difference between the 2 computers, and is there a way to check for this before I run the find method, or do I just have to set up error checking to check for the error, and change the date type accordingly?
thanks in advance,
James
recordset.findfirst "Date = #" & formatdatetime(datestring, vblongdate) & "#"
this worked fine on one computer, upon moving my database to another computer I got error 3077 "syntax error in date in expression" I changed the date type to vbgeneraldate and the code works fine. Why is there a difference between the 2 computers, and is there a way to check for this before I run the find method, or do I just have to set up error checking to check for the error, and change the date type accordingly?
thanks in advance,
James