Findfirst method not working with date fields 
Author Message
 Findfirst method not working with date fields

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


Wed, 02 May 2001 03:00:00 GMT  
 Findfirst method not working with date fields

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

Your date fields also contain a time component as well, so maybe the times
are different...

Simon Lewis



Wed, 02 May 2001 03:00:00 GMT  
 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



Thu, 03 May 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Findfirst method for name and date field

2. Form with Date Field Not Working Properly

3. Binding a datetimepicker control to a date time dataset field does not work

4. Updating Date fields in the database not working (CAPA)

5. FindFirst method not available for ADO recordset

6. findfirst method not in ado vb 6.0

7. FindFirst with Date Fields

8. Findfirst problem with date/time fields

9. FindFirst and Date fields

10. FindFirst and Date Fields in Access95

11. Findfirst not working

12. My FindFirst Not working

 

 
Powered by phpBB® Forum Software