View Single Post
  #2  
Old August 19th, 2004, 04:00 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

Hi Jon. There are several aspects to your question.

You can print multiple different reports with one click. In the Click event
of your button, just perform an OpenReport for each:
DoCmd.OpenReport "Report1"
DoCmd.OpenReport "Report2"
...
That prints the reports directly: no preview, no queries open on screen.

If you wish to filter them to just oa particular record, use the
WhereCondition of the OpenReport action. This example prints just the record
where PackingID is the same as the PackingID number in the form:
Dim strWhere As String
strWhere = "[PackingID] = " & Me.PackingID
DoCmd.OpenReport "Report1", acViewNormal, , strWhere
DoCmd.OpenReport "Report2", acViewNormal, , strWhere
...

Since you want to print multiple copies of one label, see:
Printing a Quantity of a Label
at:
http://members.iinet.net.au/~allenbrowne/ser-39.html
The article explains how to use a Cartesian Product query to generate a
record for each label to be printed, including the "3 of 4" on the label.

So, yes: you can click a button, and it all "just happens" as far as the
user is concerned.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jon L." wrote in message
...
I'm going to start this off for apologizing for not being able to find the
answer to this already on the forums as well as not being able to figure
it
out since it seems it should be easy.

Here's the background: I've got a form with some information on it. I've
got a query to pull up all sorts of related information to what I'm
looking
at in the form as well as the information in the form (one result in
query).
I've got multiple reports in which to print out this information on to an
assortment of labels (the information is different as some items are
shipped
out and we keep the backups/related items). All of this is getting
printed
out on a continuous feed label printer, the individual labels are already
separated on the roll of paper labels. I've treated each "page" of the
report as one label. Each report consists of 1 page.

The problem: Not only do I want to be able to print a report without
having
having to deal with the query or report in any way (i.e. click on the
button,
query opens, report prints) but I want to print out a specific number of
copies of one of my one page reports. "Specific number" happens to refer
to
a quantity that has been produced and needs labeled and this number is
fetched by the query.

What I'd like the play by play to be: I click button. Query opens, report
#1 prints "n" number of copies. Report #1 closes. Report #2 opens.
Report
#2 prints "x" number of copies ("x" is preset/static). Report #2 closes.
Report #3 opens. Report #3 prints one copy. Report #3 closes. Query
closes. Nothing of the above is apparent to the user except the new pile
of
labels he/she has to now deal with. Can I write all of this to happen
with a
single on_click event?

Hopefully the over-explanation helps and thanks in advance.

-Jon