run repors back to back (1 Viewer)

mrrayj60

Registered User.
Local time
Today, 00:09
Joined
Sep 3, 2009
Messages
103
I would like to run another report after this report the next report is ltrvrc, can it be done at the same time or do I need to make a new control button? Thanks, Ray

Private Sub cmdcltr_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "ltrcitation"
strWhere = "[COMPLAINTID]=" & Me!txtcomplaintid
DoCmd.OpenReport strDocName, acPreview, , strWhere


End Sub
 

namliam

The Mailman - AWF VIP
Local time
Today, 06:09
Joined
Aug 11, 2003
Messages
11,695
If....
strDocName = "ltrcitation"
strWhere = "[COMPLAINTID]=" & Me!txtcomplaintid
DoCmd.OpenReport strDocName, acPreview, , strWhere

Opens one report.....

Then how would you be able to open a second report.
 

mrrayj60

Registered User.
Local time
Today, 00:09
Joined
Sep 3, 2009
Messages
103
Same parameters needed, the context of the letters are different. I just want to run both from one button, versus two seperate buttons. Thanks, Ray
 

SOS

Registered Lunatic
Local time
Yesterday, 21:09
Joined
Aug 27, 2008
Messages
3,517
You can open more than one report from a single event. The question is, do you want them both open at the same time? If not, that is a bit trickier. If so, then you can just stack the opening (remembering that the last one opened will be on top).
 

namliam

The Mailman - AWF VIP
Local time
Today, 06:09
Joined
Aug 11, 2003
Messages
11,695
strDocName = "report1"
strWhere = "[COMPLAINTID]=" & Me!txtcomplaintid
DoCmd.OpenReport strDocName, acPreview, , strWhere
strDocName = "report2"
strWhere = "[COMPLAINTID]=" & Me!txtcomplaintid
DoCmd.OpenReport strDocName, acPreview, , strWhere
strDocName = "report3"
strWhere = "[COMPLAINTID]=" & Me!txtcomplaintid
DoCmd.OpenReport strDocName, acPreview, , strWhere
strDocName = "report4"
strWhere = "[COMPLAINTID]=" & Me!txtcomplaintid
DoCmd.OpenReport strDocName, acPreview, , strWhere
 

Users who are viewing this thread

Top Bottom