Printing reports

M

Mack

I have 5 reports that I want to print by entering the customer number. As it
is now, I am prompted each time a report is printed. Is there a way to loop
through all the reports by entering the customer number one time and printing
the all the reports without being promped each time?
 
J

Jeff Boyce

One approach would be to create a form in which the user enters the customer
number (or looks it up from a combobox). Then you'd modify each of the
queries feeding their respective reports (your reports DO use queries to
feed them, right?!). Either your queries or your reports prompt for a
'customer number'. In place of that prompt, refer to the form, with
something like (untested):

Forms!YourFormName!txtYourTextBoxContainingTheCustomerNumber

(*use your own form and control names*)

Note that the form MUST be open and the field filled with a valid value for
this approach to work.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
S

S.Clark

1. Create a table with a column for Customer Numbers.
2. Populate the table with the desired customer numbers.
3. Add the new table to the datasource of the report, link it by the
customer number. (Remove anything that causes the previous prompts.)

For extra credit, create a form to allow the entry, and a button to run the
report.
 
M

Mack

S. Clark

I have a Shear, Bend, Tab and a Trim Report. They are seperate reports. I
have a query that prompts me for the Customer Number. That works just fine.
After the first report ( Shear) is printed, I am prompted again to print the
second report (Bend). I want to create a loop or something that will allow me
to enter the Customer number one time and print all the reports.
 
M

Mack

Everything works fine with the exception of haviing to be prompted each time
a report is printed. Is it possible to write a code in the Event Procedures
to print all the reports after I have entered the customer # only one time?
 
J

Jeff Boyce

If each of your reports is based on a query that points to the form, and if
your command button procedure opens Report1, then Report2, then ..., I would
think you'd NEVER see the prompt.

This depends, of course, on whether you have a prompt embedded in each query
(report1's query, report2's query, ...) or if you have the prompt embedded
within each report definition.

NOTE: You may not have added a "prompt", but if your query or report
specifies a fieldname that Access doesn't recognize, Access will PROMPT you!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

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

Similar Threads


Top