By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,671 Members | 1,280 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,671 IT Pros & Developers. It's quick & easy.

Reports are based on????

P: n/a
Ron
Hi All,

I needed a report so I used the report wizards to make it based on a query I
made (also made with a wizard). That all works great.

However, now I need a identical report only based on a subset of the data I
used for the first report...plus, a little other info (from another query).
I thought, okay, I'll copy the first report and rename. Except it's source
is the 1st query. I need it's source to be another query. Not a problem,
just copy the query, rename it, change it accordingly and used that as the
2nd report's source, and viola. There's my new report.

But, now I've got 2 querys and 2 reports to maintain--plus some subreports I
have to worry about too...so now I've got 2 of those, etc.

If my user says "gee, sure would be cool if these reports hand "x" in them
too, then I've got to change multiple reports/querys/subreports, etc. A
pain.

Is there a way to tell access to run a report, but instead of the report
being based on a specific query (hardwired, so to speak in the "source" area
of the report), have it use different querys with basically the same info,
chosen at runtime? And, if it's possible, can someone point me to where I
might find the correct way to do this?

Thanks,
ron
Feb 27 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
The Command Button Wizard will generate code in its Click event to execute a
Report. You can put your cursor on the DoCmd.OpenReport in the Module
window, then press F1 to see help on the WhereCondition argument of
DoCmd.OpenReport. Then if you'd post back here stating the name of the
Control on the Form where the user will select the value to be matched, and
the name of the Field in the Query that identifies the Record, I suspect
someone will help you with writing the code, if you aren't already familiar
with doing so.

Larry Linson
Microsoft Access MVP
"Ron" <ro********************@verizon.netwrote in message
news:bqOEh.2653$KE2.78@trnddc06...
Hi All,

I needed a report so I used the report wizards to make it based on a query
I made (also made with a wizard). That all works great.

However, now I need a identical report only based on a subset of the data
I used for the first report...plus, a little other info (from another
query). I thought, okay, I'll copy the first report and rename. Except
it's source is the 1st query. I need it's source to be another query.
Not a problem, just copy the query, rename it, change it accordingly and
used that as the 2nd report's source, and viola. There's my new report.

But, now I've got 2 querys and 2 reports to maintain--plus some subreports
I have to worry about too...so now I've got 2 of those, etc.

If my user says "gee, sure would be cool if these reports hand "x" in them
too, then I've got to change multiple reports/querys/subreports, etc. A
pain.

Is there a way to tell access to run a report, but instead of the report
being based on a specific query (hardwired, so to speak in the "source"
area of the report), have it use different querys with basically the same
info, chosen at runtime? And, if it's possible, can someone point me to
where I might find the correct way to do this?

Thanks,
ron


Feb 27 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.