run repors back to back

mrrayj60

Registered User.
Local time
Today, 06:50
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
 
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.
 
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
 
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).
 
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

Back
Top Bottom