Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    Victoria, BC
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pass a date range to a Query (97 SR2)

    I have six queries from which I need the counts on a subform, filtered between two dates the user can enter on the main form. I cannot seem to pass the dates to filter the results. Help!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pass a date range to a Query (97 SR2)

    Say that your form is named frmMainForm, and that the dates are entered in text boxes txtStartDate and txtEndDate. Enter the following expression in the Criteria row under the date field in the queries:

    Between [Forms]![frmMainForm]![txtStartDate] And [Forms]![frmMainForm]![txtEndDate]

    Post back if this is not what you need.

  3. #3
    New Lounger
    Join Date
    Jan 2001
    Location
    Victoria, BC
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass a date range to a Query (97 SR2)

    Worked a charm, thanks.

Posting Permissions

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