In this post I’ll share with you one of my favorite tricks to customizing an Access report with parameter values in the header. Lets say that you build a report off a query that prompts the user to enter a start date and an end date. The following screenshots will show you how to add a text box in the report to share the date range of the reporting period.
First setup the query with a date field as shown below. Read my blog post on parameter queries here.
When you run the query you will be ask to enter the parameter values for the start date and end date.
Once you save the query, click the query just once in the navigation pane. Then click Create–>Report. Save the report. You will need to reference the report name later.
Switch the report to design view and expand the header length.
Add a text box with the following formula
=Reports![Report Name]![Parameter Name]
Add optional labels to make the report look more appealing.
Run the report, enter the parameters, and smile when the dates you entered in the parameter boxes are visible in the report!🙂
Download the Database file I used for the screenshots here from my SkyDrive account.