Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2001

    Question Unanswered: using 'between' in a parameter query

    I have created a parameter form for users to enter a from and to date for a report. In my report query I used between beginning date and ending date in the criteria but when the report is run, no records are shown for the beginning and ending dates. How can I get the report to include the beginning and ending dates?

  2. #2
    Join Date
    Apr 2002
    WHERE Date BETWEEN beginning_date AND end_date
    should equal
    WHERE Date >= beginning_date AND Date <= end_date

    But if you are using date & time it will probably leave out the end date (not the start date) as 2002-04-10 <= 2002-04-10 10:37:45 is false.
    WHERE CLng(Date) BETWEEN CLng(beginning_date) AND CLng(end_date) should solve that problem. You could use the format function instead, but type conversion works like a charm on Jet workspaces and for others you'll have to do a different approach anyway.

    If that's not the problem I'm clueless

    edit: 2002-04-10 10:37:45 <= 2002-04-10 is false it is of course
    Last edited by Apel; 04-10-02 at 09:53.

  3. #3
    Join Date
    Sep 2001
    Thanks - I'll give it a try and let you know.......

Posting Permissions

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