
Findfirst method not working with date fields
Just as literal strings need to be enclosed in quotes, literal dates
need to be enclosed in pound signs:
rst.findfirst "[firstdate] =#" & rst2!seconddate & "#"
-- Andy
Quote:
>Hi
>I am using findfirst to sort some records but when I try to sort on the date
>fields the code runs but doesn't return the correct Nomatch value.
>rst.findfirst "[firstdate] =" & rst2!seconddate
>The syntax works with other fields and the date fields work in an if
>firstdate <>seconddate then...
>Any suggestions would be appreciated
>thanks
>David DeMeglio