one query - many reports

P

patti

I have a query that i want to use as the basis for 4 reports.

Report 1: Vendor=12 and Div=WAP
Report 2: Vendor=12 and Div=WAC
Report 3: Vendor<>12 and Div=WAP
Report 4: Vendor<>12 and Div=WAC

How can i hard code this into report so that the necessary parameters are
used?
And how do i get those parameters to print out on the report?

Thanks.

patti
 
D

Duane Hookom

IMHO, criteria for reports should always be entered into controls on forms.
In most cases I build a where condition in code to use in the
DoCmd.OpenReport method.

Dim strWhere as String
strWhere = "Vendor=12 and Div='WAP'"
DoCmd.OpenReport "rptYourRpt", acPreview, , strWhere
 
P

patti

I have had a chance to implement your suggestion and see the efficiency and
economy of using the form.
At points, i lose the forest for the trees. Thanks again so much for taking
the time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top