Re: Using one report for different queries



What is different about your 10 queries? It seems to me like you
should be able to do all of this with one query, one report, and
perhaps a filter.



john wrote:
I have a report to print envelopes. The report is based on a query. Now I
need to make 10 more queries to make different selections of addresses.
Every query has the same output fields as the already existing query. I know
I can copy the report and base it on another query but then I would have to
make 10 extra reports. How can I use just one report for all of the queries?
At the moment I use the button wizard in my forms to make buttons that start
the particular reports. Resulting code looks like this:

Private Sub Knop34_Click()
On Error GoTo Err_Knop29_Click

Dim stDocName As String

stDocName = "Alle leden per Bezorgcategorie"
DoCmd.OpenReport stDocName, acPreview

Exit_Knop29_Click:
Exit Sub

Can I perhaps add some code that points which query the report should be
based on?
Thanks,
john

.


Quantcast