Report with a command button

  • Thread starter Thread starter Stephm
  • Start date Start date
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
 
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
 
Excellent! Thank you. Question: When I run both of the
reports (birthdays and then labels), I'm using a form
with an unbound combo box for the month. For example, if
the user selects "January" the birthdays report runs with
the January birthdays. Same idea for the labels.

So now that my reports are "linked", I am still requiring
the user to select "January" for the birthday report and
then "January" for the labels. Is there a way to
streamline this too? If I can't pass "January" through
to the labels or make the user select "January" for the
labels, ALL birthdays would print. Thanks for the help-
I really appreciate it! Steph
 

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

Back
Top