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

Open multiple reports with one button/set of criteria? 1

Status
Not open for further replies.

marvelisticme

Technical User
Feb 3, 2005
70
US
Hi, all :)

I have an access application that has multiple reports that will most times need to be run at the same time with the same date range as criteria. It would be easier for the user to click only one button when she needs to run all reports for the same time period, but I'm at a loss as to how to configure a switchboard button to do this, if it's even possible.

Thanks for any ideas!
 
Have an unbound form with 2 textbox for the date range and 1 button for launching the reports with a serie of DoCmd.OpenReport calls in the Click event procedure.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks, PH :)

How, then, do I include the query criteria in the docmd's?
 
Take a look at the 4th argument of this method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Ok, I'm having a difficult time getting the sentax right. I have 2 text boxes (text1 and text3) on the form, into which will be entered the begin date and end date for all of the reports. Each report has a query and each query has a date stamp field which is filtered as follows...

Between [Enter report begin date] And [Enter report end date]

So, how do I relate the fields on the form to the criteria for the query, in the sentax? I have so far...

DoCmd.OpenReport RPT_address, acViewNormal, QRY_address,

This is, of course, assuming the query name satisfies the FilterName argument in the sentax.

Thanks for your help!
 
So, in the query use this:
Between [Forms]![your mainform]![text1] And [Forms]![your mainform]![text3]

And in the Click event procedure:
DoCmd.OpenReport RPT_address, acViewNormal


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Oh, this is driving me crazy!

I have done as you suggested, leaving out the acViewNormal this time because it is the default. However, the following syntax keeps giving me an error saying the method requires a report name. More specifically (Run-time error '2497': The action or methos requires a Report Name argument.

DoCmd.OpenReport RPT_address2

RPT_address2 is, of course, the report name. I feel like such an idiot, but I just can't figure it out. I've tried () and [] and "," but it keeps giving me the same error.
 
And this ?
DoCmd.OpenReport "RPT_address2"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That did it! Thank you so much! I may have more questions, but I'm rolling for now :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top