• Parameter Query (Access 2003)

    Author
    Topic
    #440732

    I have a field in my query [EndDate]. I would like it to prompt the user for dates between eg. March 4 and March 10. How do I set this up in the query – and resulting report.
    Thank you for any suggestions or help.

    Viewing 0 reply threads
    Author
    Replies
    • #1056547

      You could put the following in the Criteria line:

      Between [Enter First Date] And [Enter Last Date]

      Select Query | Parameters.
      Enter [Enter First Date] in the Parameter column, and select Date/Time as data type.
      Enter [Enter Last Date] in the next row in the Parameter column, and select Date/Time as data type.
      Click OK.

      You can refer to [Enter First Date] and [Enter Last Date] in the control source of a text box on the report, for example

      =[Enter First Date]

      or

      =”Report for the period from ” & [Enter First Date] & ” to ” & [Enter Last Date]

      Alternatively, set up a form with two text boxes txtFirstDate and txtLastDate, format them as dates, and use [Forms]![NameOfTheForm]![txtFirstDate] and [Forms]![NameOfTheForm]![txtLastDate] as parameters instead of [Enter First Date] and [Enter Last Date].

    Viewing 0 reply threads
    Reply To: Parameter Query (Access 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: