Results 1 to 3 of 3

Thread: Parameters

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600
    Hi all and sundry.

    Does anyone know how to include Access parameters in an Access report (not from VB, but within Access itself).

    For example, you create a report that is based on a Query that asks for Beginning and Ending Dates (parameters). How would you get these parameters to be displayed in a text box or label on the report?

    Thanks.

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163
    From access online help:

    Print the criteria for a report in the report header

    1 Create the criteria parameters in the report's underlying query.

    How?

    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.

    For example, if the parameters in the query are:

    Between [Type a beginning date] And [Type an ending date]

    and you want to display them in two text boxes, set the ControlSource property of one text box to:

    [Type a beginning date]

    and the ControlSource property of the other text box to:

    [Type an ending date]

    If you want to display the parameters in one text box, you can use an expression in the ControlSource property box; for example:

    ="Between " & [Type a beginning date] & " and " & [Type an ending date]

    Microsoft Access displays the parameter values exactly as you typed them in the prompt.

    5 To see the criteria, print or preview the report.
    Glenn D
    Development/Analyst

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    You got that from M$? :)

    Glenn, thanks for the response.

    The technique works. It's good to see that M$ is providing useful "help" for a change.

    Thanks again.

Posting Permissions

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



Click Here to Expand Forum to Full Width