Reports are based on???? 
February 27th, 2007, 03:35 AM
| | | Reports are based on????
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 | 
February 27th, 2007, 03:55 AM
| | | Re: Reports are based on????
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" <ronSPAMBLOCKINGwest777@verizon.netwrote in message
news:bqOEh.2653$KE2.78@trnddc06... Quote:
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
>
>
| | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,840 network members.
|