print two reports at the same time

F

Fred's

Is there a way to print two reports at the same time with a control
button?

The fist report have one side page and the second report have 2 side
page.


Thanking all in advance for your help!
 
W

Wayne-I-M

Private Sub ButtonName_Click()
DoCmd.OpenReport "Report1", acViewNormal, "", "", acNormal
DoCmd.OpenReport "Report2", acViewNormal, "", "", acNormal
End Sub
 
F

Fred's

Private Sub ButtonName_Click()
    DoCmd.OpenReport "Report1", acViewNormal, "", "", acNormal
    DoCmd.OpenReport "Report2", acViewNormal, "", "", acNormal
End Sub

--
Wayne
Manchester, England.







- Show quoted text -

Hi Wayne,

I forgot to tell that the second report must be printed only if
specific suppliers appear on my first report?
What will be the best way to do that?

Thanking you in advance,
Fred.
 
W

Wayne-I-M

Without knowing your application I've not a clue.

In general would sugest that your 1st report is based on a query and that
"something" trips the 2nd report to print (poss. use an IIF)

you would need to give more information to ge an answer that works
 
F

Fred's

Without knowing your application I've not a clue.

In general  would sugest that your 1st report is based on a query and that
"something" trips the 2nd report to print (poss. use an IIF)

you would need to give more information to ge an answer that works
--
Wayne
Manchester, England.








- Show quoted text -

Could you provide an example?
 
W

Wayne-I-M

Not really - sorry about this I know it's not what you're looking for.

Look at it like this. If you have a report that shows ten suppliers and you
want a 2nd reprt to print if some suppliers are in the 1st. Thats no
problem. But - don't look at the reports. Look at the data in them.

In this case (this is just one quick idea) I may run the report from a form
based on a query (the same one that runs the first report). In this case I
would need to code a button that says .....IIf A and B and G and H suppliers
all on the form then run the 2nd report. If they are all not on the from,
then don't.

But, like I said you would need to provide more information about the trip
(what specifically makes you need to print the 2nd report) and what are you
using to get this date before you will get an answer that will work.
 
F

Fred's

Not really - sorry about this I know it's not what you're looking for.

Look at it like this.  If you have a report that shows ten suppliers andyou
want a 2nd reprt to print if some suppliers are in the 1st.  Thats no
problem.  But - don't look at the reports.  Look at the data in them.

In this case (this is just one quick idea) I may run the report from a form
based on a query (the same one that runs the first report).  In this case I
would need to code a button that says .....IIf A and B and G and H suppliers
all on the form then run the 2nd report.  If they are all not on the from,
then don't.

But, like I said you would need to provide more information about the trip
(what specifically makes you need to print the 2nd report) and what are you
using to get this date before you will get an answer that will work.

--
Wayne
Manchester, England.






- Show quoted text -


Thanks for your reply Wayne, here are more details;

This is the SQL Statement of the query that runs the first report.
(The name of the report is: Report container Details)

SELECT Source.TRAILER_NUM " " & libelle.ch2 AS location1,
division.wave, division.feuille, Source.TRAILER_NUM, Source.[Merch
Type], libelle.ch2 AS lib, Source.[Date In], Source.AppointmentDate,
Source.[WMS Shipment #], Source.Division, Source.[Retek 9 PO], Source.
[Old PO] AS po, Source.[AS400 Style #], Source.Color, Source.Supplier,
Source.Style, Source.SumOfREQUESTED_QTY, Source.ITM_COLOR,
Source.BalanceToBeReceived FROM libelle, division INNER JOIN Source ON
division.divisi = Source.Division WHERE
(((Source.TRAILER_NUM)=[TRAILER_NUM:] Or
(Source.TRAILER_NUM)=TRAILER_NUM:] & "US ") AND ((Source.[Merch
Type])=[libelle].[Merch Type]) AND ((Source.BalanceToBeReceived)<>0))
ORDER BY Source.[Retek 9 PO], Source.ITM_COLOR;

And the SQL Statement of the query that runs the second report below.
(The name of the report is: Worst supplier verification)

SELECT source.Division AS DIVISION, division.wave, division.feuille,
source.[WMS Shipment #] AS CHIPMENT, source.AppointmentDate AS DATEE,
source.[Retek 9 PO] AS PO, source.Style AS STYLEF, source.[AS400 Style
#] & " - " & source.ITM_COLOR AS NSTYLE, source.Color & " - " &
source.ITM_COLOR AS nb_cou, source.ITM_COLOR, source.TRAILER_NUM,
source.SumOfREQUESTED_QTY, source.[Total Qty], source.Supplier,
source.BalanceToBeReceived, nb_color.nb, " PO Ref. : " & source.[Old
PO] AS po_ref, libelle.ch2 AS dept, source.ORDER_TYPE
FROM nb_color, libelle, division INNER JOIN source ON division.divisi
= source.Division WHERE (((source.[Merch Type])=[libelle].[Merch
Type]) AND ((source.TRAILER_NUM) Like [TRAILER_NUM:]) AND ((source.
[Retek 9 PO])=[nb_color].[po]) AND ((source.BalanceToBeReceived)<>0))
GROUP BY source.Division, division.wave, division.feuille, source.[WMS
Shipment #], source.AppointmentDate, source.[Retek 9 PO],
source.Style, source.ITM_COLOR, source.TRAILER_NUM,
source.SumOfREQUESTED_QTY, source.[Total Qty], source.Supplier,
source.BalanceToBeReceived, nb_color.nb, libelle.ch2,
source.ORDER_TYPE, source.[Old PO], source.[AS400 Style #],
source.Color, source.[Old PO], source.[Merch Type]
ORDER BY source.[Retek 9 PO], source.ITM_COLOR;

Thanking you in advance,
Fred's
 

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