Report with a command button

S

Stephm

Hi. I have a (first) report that pulls everyone that has
a birthday in a certain month. Then I created a (second)
report based on the same query to run mailing labels.

Can I streamline by having the first report have a
command button (or something) to run the mailing labels,
which would print labels only those people who were
identified in the first report? Or is that too much to
hope for? If not, how would I do it?

Thanks for the insight!
Steph
 
P

PC Datasheet

You can't put a button on a report! Put the following code in the Close
event of the first report:
Dim MsgStr As String
Dim TitleStr As String
MsgStr = "Do you want to print labels for the birthday people?"
TitleStr = "Print Labels??"
If MsgBox(MsgStr,vbYesNo,TitleStr) = vbYes Then
DoCmd.OpenReport "NameOfReport2"
End If
 
Top