Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Posts
    1

    Question Unanswered: Selecting records between 2 dates

    I have a VB6 application connecting out to an Access 2000 DB and I'm trying to select all records where the Date in the DateRC field is between StartDate and EndDate.
    The code I'm using is:

    Set RS1 = MYDB.OpenRecordset("SELECT * FROM TaskTbl where DateRC >=#" & StartDate & "# AND DateComplete <=#" &EndDate &"#")

    But this is just returning all records with any value in DateRC. If I do the same sort of thing in an Access query it seems to work fine.

    Help...

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    ... StartDate & "# BETWEEN DateComplete ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •