Is it Possible to Output Query Parameters into Report Title?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suzanne099
    New Member
    • Mar 2007
    • 7

    #1

    Is it Possible to Output Query Parameters into Report Title?

    Good Morning,

    I have a report populated by a query with a date range parameter (begin/end date). Is there a way to output the selected date range into the report title (i.e., include the selected begin and end date by the user into the report title).

    I haven't been able to figure out how to do this, since the parameters are not saved.

    Thank you in advance.
    Suzanne
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    Yes, you could do so in V97 and V2000 I don't know of any reason you can't still do so in the newest versions:
    Display a criteria parameter in an Access report(V97+V200 0)
    A parameter query is a query that when run displays its own dialog box prompting you for information, such as criteria for retrieving records or a value you want to insert in a field. Parameter queries are handy when used as the basis for reports. For example, you can create a regional earnings report based on a parameter query. When you print the report, Access displays a dialog box asking for the country or region that you want the report to cover. You enter a country or region and Access prints the appropriate report. You can also display and print a parameter from the report's underlying query in the report.

    To display the criteria for a report in the report header
    1.Create the criteria parameters in the report's underlying query.
    For more information about creating criteria parameters in a query, type create parameter query in the Office Assistant or on the Answer Wizard tab in the Help window, and then click Search.

    2.Open the report in Design view.
    3.Create an unbound text box for each parameter you want to display. Click the Text Box tool in the toolbox, and then click in the report header.
    4.To display the property sheet, make sure the text box is selected, and then click Properties on the toolbar.
    5.Set the ControlSource property to the parameter(s) you specified in the Criteria cell in the query; type each parameter exactly as it appears in the query, and be sure to include the square brackets.
    6.To see the criteria, print or preview the report. Access displays a dialog box asking for the parameter value, and then displays the parameter value you entered in the report header.
    Please do the following:
    If this works, let us know :)
    and click on the link above and click [yes] it helped so that they will keep the article available.
    thnx
    -z

    [Edit] In case this doesn't work: I will often use a form to get the values for the parameters. I then hide the form and reference the form's control values.
    Last edited by zmbd; Aug 15 '13, 02:07 PM. Reason: [z{added the edit section about form controls}]

    Comment

    • suzanne099
      New Member
      • Mar 2007
      • 7

      #3
      Thanks so much!!!!!!

      Comment

      Working...