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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple reports same query

Status
Not open for further replies.

OAKLEYS21

MIS
Jun 28, 2004
20
CA
Hello,

I have several reports with sub reports that all use the same query. I want to open them all at once with the same set of criteria. I created a macro to do it except when I run the macro I have to enter the same parameter value 6 times to open the different reports at the same time. (it prompts me 6 time to "enter lease number") Is there a way I can set either the reports or the macro so that I can only enter the criteria once? Thanks.
 
Create a form with a text box and a command button. Name the text box txtLeaseNo and the button cmdPreviewReport. Name the form frmCreateLeaseReport.

In the criteria row for the Lease field of each query, enter forms!frmCreateLeaseReport!txtLeaseNo.

In design view of frmCreateLeaseReport, click the cmdPreviewReport button and hit alt-enter. Properties will show up. Enter the name of your macro in the On Click event.

Preview the form.

Now you only have to enter the lease number one time. When you click the Preview Report button, the report will show up as expected.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top