Mr. B
I made the following code change, and it works fine. (See changes below) What I can’t figure out is why (DoCmd.OpenReport) prints. While (DoCmd.OpenReport needs a acViewPreview) to preview. Can you recommend a beginner’s free tutorial to bone up on VBA.
Private Sub cmdOk_Click()
'use a "Case" statement to determine the report to be used
Select Case Me.grpReportOpts
Case 1 'use the All Names report
'use a "Case" statement to determine the output for the report
Select Case Me.grpOutputOpts
Case 1 'preview report
DoCmd.OpenReport "Attandance All R", acViewPreview
Case 2 'send to printer
I took this out: ' DoCmd.OpenReport "Attandance All R", acViewPreview
And added this: DoCmd.OpenReport "Attandance All R"
End Select
Case 2 'use the by one name report
'use a "Case" statement to determine the output for the report
Select Case Me.grpOutputOpts
Case 1 'preview report
DoCmd.OpenReport "Attancance by name R", acViewPreview
Case 2 'send to printer
DoCmd.OpenReport "Attancance by name R"
End Select