Help with Enabling buttons when option button is checked

  • Thread starter Thread starter Ayo
  • Start date Start date
A

Ayo

How do I tell the program to enable the comand buttons on my form when either
of the option buttons on the for is checked?
I am trying to write a code that would enable some buttons on my form when I
select one of two option buttons. So far this is what I have and it is not
working quite as I hoped. Any help will be greatly appreciated.
Thanks

Private Sub AllReviewerReport_Click()
Dim strReport As String

'if optPortrait.
Forms![Invoice Tracker Reports]!AllVendorReport.Enabled = True
Forms![Invoice Tracker Reports]!AllReviewerReport.Enabled = True
Forms![Invoice Tracker Reports]!VendorReviewerReport.Enabled = True

Select Case Me.optgrpOrient
Case 1
strReport = "Reviewer Report"
Case 2
strReport = "Reviewer Report Landscape"
End Select
DoCmd.OpenReport strReport, acViewPreview
'DoCmd.Close acForm, "Invoice Tracker Reports"

End Sub
 
Have you tried enabling and disabling the buttons from one of the option
group events. Both on_click and after_update should do the trick.
 
Back
Top