Form to Print View Multiple Reports

T

TotallyConfused

I have a main form and a subform. When I lookup a name the subform lists
names of patients. However, these patients may require a reminder for
different
procedures. I would like a command button to generate a report for vaccines,
and if there is a pt that needs to come in for a physical generate another
report for that pt. Therefore, there would be two reports for each different
patient for the same docs office. On my main form, I have several command
buttons to be able to print reports. Below is sample of code. However, I
would like to take this a step further. I want to be able to - when I look
up a doc and I get a list of pts. I want to be able to with one command
button to generate the reports for the pts listed for this doc. One doc may
have 5 pts. 2 patients may need vaccine reminders and 3 may need physical
reminders. Therefore, on clicking this command button I get two reports.
Vaccine report with 2 pts and Physical with 3 patients at the same time. I
have a field that Identifies the reminder ltr. "VAC### and "PHY###". How do
I incorporate this into my code? Thank you in advance for any help.

Private Sub VC_RMDR_Click()
On Error GoTo Err_VC_RMDR_Click

Dim stDocName As String

stDocName = "rpt VC RMDR"
DoCmd.OpenReport "rpt VC RMDR", acPreview, , "[DR ID]=" & Me![DR ID]

Exit_VC_RMDR_Click:
Exit Sub

Err_VC_RMDR_Click:
MsgBox Err.Description
Resume Exit_VC_RMDR_Click

End Sub
 

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