Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Location
    pune
    Posts
    1

    Post Unanswered: MsAccees Query Problem

    I want help on writing date queries in MS Access
    Selecting from & To date Condition
    using between clause
    please help me out from the problem
    bye
    Manish

  2. #2
    Join Date
    Aug 2002
    Location
    Northampton, England
    Posts
    266
    Probably the easiest way is to create a query with the criteria you require, and in the date field add your date criteria. Something like this.

    Between #01/01/02# And #31/12/02#

    If you are taking the date criteria from a form you can use this.

    Between [forms]![YourFormName]![textBoxName] And [forms]![YourFormName![TextBoxName]

    If you are using parameters, use something like this.

    Between [Enter Start Date] And [Enter End Date]

    And finally, if you are going to use SQL you can use something like this.

    SELECT TableName.DateFieldName
    FROM TableName
    WHERE (((TableName.DateFieldName) Between #1/1/2001# And #12/31/2002#));

    David

Posting Permissions

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