Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report prompt question

Status
Not open for further replies.

Crevalle

Technical User
Aug 16, 2004
36
0
0
US
I have a report that utilizes an underlying query that prompts for a date range (one prompt asks for the beginning date, the next asks for the ending date--format is: "08/15/2004"). The report displays data for whatever date range the user enters. However, I would like to display, at the top of the report, the date range the user entered. This way if they print it out or give it to someone, it will have the range prominently shown.

Could someone explain how this is done, or point me in the right direction? I've done searches here, but to no avail. Thanks--I'll keep checking back!
 
What i would do is have a form, and have the date input on there, create two text boxes, STARTDATE and ENDDATE, and have a button on there which open the report for the user.

Change you query code to have the start and end date taken from the form

[Forms]![FORMNAME]![STARTDATE]
[Forms]![FORMNAME]![ENDDATE]

In the report header insert a text box, and you would say something like



="The Report display records between " & [Forms]![FORMNAME]![STARTDATE] & " to " & [Forms]![FORMNAME]![ENDDATE]
 
M8KWR--I appreciate the detailed recommendation, but I think you've eclipsed my knowledge of Access. I have no experience with forms, or SQL. Is there any method more straight-forward or less complex?
 
While using text boxes on a form is the preferred method, you can utilize the parameter prompts in your query. Add a text box to your report whose control source is like this:
Code:
="For the dates " & [Enter Beginning date] & " to " & [Enter Ending date]
where the parameters are spelled EXACTLY like they are in the query....

Hoc nomen meum verum non est.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top