I think this is easy to do, but I am not sure how to write this. Here it is:
I have an option group on my form (5 choices) Each choice is for a report to print. I did it using macros, but the report goes behind the form. So, I need to write a snippet of code so that when the option is selected the code prints the report. I can do it using this piece:
Private Sub Command37_Click()
DoCmd.OpenReport "rptNAMCNotScheduled", acViewPreview
End Sub
However, the code will not work for each option, because it will keep generating the same report. I need it run the report associated with each option. If someone could help me with the sample code...I believe I can get the rest to work. Thanks everyone!!
-J
-Joey
I have an option group on my form (5 choices) Each choice is for a report to print. I did it using macros, but the report goes behind the form. So, I need to write a snippet of code so that when the option is selected the code prints the report. I can do it using this piece:
Private Sub Command37_Click()
DoCmd.OpenReport "rptNAMCNotScheduled", acViewPreview
End Sub
However, the code will not work for each option, because it will keep generating the same report. I need it run the report associated with each option. If someone could help me with the sample code...I believe I can get the rest to work. Thanks everyone!!
-J
-Joey