Connecting Tech Pros Worldwide Help | Site Map

Reports are based on????

  #1  
Old February 27th, 2007, 04:35 AM
Ron
Guest
 
Posts: n/a
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


  #2  
Old February 27th, 2007, 04:55 AM
Larry Linson
Guest
 
Posts: n/a

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
>
>

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Report that does not display format properly (Based on Crosstab query)..... kcdoell answers 6 May 12th, 2008 06:08 PM
Filter report based on values of calculated value on report mlcampeau answers 94 September 8th, 2007 11:12 AM
Email Access Report based on a Pass-thru query to Oracle A49553 answers 1 June 2nd, 2007 04:58 PM
Reports - Displaying a chart based on a parameter type query Andy Davis answers 4 November 13th, 2005 09:24 AM