Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print multiple reports from checkbox selection

Status
Not open for further replies.

millrat

Technical User
Dec 23, 2003
98
US
Hi,
How can I print multiple reports based on checkbox selection on a form?
Case1- checkbox1, checkbox2 not selected, print report1
Case2- checkbox1 selected, checkbox2 not selected, print report 1 and report2
Case3- checkbox1 and checkbox2 selected print report1,report2 and report3
Thanks for your help
millrat
 
How about

Code:
Dim intC As Integer
intC = 0
If checkbox1 Then intC = 1
If checkbox2 Then intC = intC + 2

SELECT CASE intC
Case intC = 0
    DoCmd.OpenReport "Report1"
Case intC = 1
    DoCmd.OpenReport "Report1"
    DoCmd.OpenReport "Report2"
Case intC = 2
    Msgbox "On print option specified for this combination"
Case intC = 3
    DoCmd.OpenReport "Report2"
    DoCmd.OpenReport "Report3"

END SELECT



'ope-that-'elps.



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top