Help with Enabling buttons when option button is checked

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
 
L

Lance

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top