G
Guest
Hi,
I have an option group (frClients) on an Access form which I call up from a
command button (PrintTime-sheets). On selection of option button (option24)
labelled "SBSA" I want to open and print a report named "rptSBSA" from code.
I have 16 different option buttons in the option group. I have tried the
following code but it does not print the report - can anyone tell me why or
what is missing from the code?
Private Sub PrintTime_sheets_Click()
Dim lngViolet As Long
frClients.Visible = True
Select Case Me!frClients
Case 1
lngViolet = RGB(128, 0, 128)
Me!SBSA.ForeColor = lngViolet
DoCmd.OpenReport "rptSBSA"
Case 2
lngViolet = RGB(128, 0, 128)
Me!DevBank.ForeColor = lngViolet
DoCmd.OpenReport "rptDevBank"
Case 3
lngViolet = RGB(128, 0, 128)
Me!DevBank.ForeColor = lngViolet
DoCmd.OpenReport "rptDevBank
End Select
End sub
I have an option group (frClients) on an Access form which I call up from a
command button (PrintTime-sheets). On selection of option button (option24)
labelled "SBSA" I want to open and print a report named "rptSBSA" from code.
I have 16 different option buttons in the option group. I have tried the
following code but it does not print the report - can anyone tell me why or
what is missing from the code?
Private Sub PrintTime_sheets_Click()
Dim lngViolet As Long
frClients.Visible = True
Select Case Me!frClients
Case 1
lngViolet = RGB(128, 0, 128)
Me!SBSA.ForeColor = lngViolet
DoCmd.OpenReport "rptSBSA"
Case 2
lngViolet = RGB(128, 0, 128)
Me!DevBank.ForeColor = lngViolet
DoCmd.OpenReport "rptDevBank"
Case 3
lngViolet = RGB(128, 0, 128)
Me!DevBank.ForeColor = lngViolet
DoCmd.OpenReport "rptDevBank
End Select
End sub