I have a problem with option group's code.

tjb001

New member
Local time
Yesterday, 19:25
Joined
Aug 30, 2015
Messages
9
Option Group.png
As you see in the image, I have three options groups. When I check No of G and Yes of B, the ER option will be enabled( I choose enabled false on ER).
Code:
Private Sub frER_Click()
 If Me.frG.Value = 2 And Me.frBrand.Value = 3 Then
        frER.Enabled = True
        Else
        frER.Enabled = False
        End If
        
End Sub
After I type the code, it does not work. How could I fix it?
Thank you.
 
That type of code I would expect in the after update events of the other 2 frames. If it's not enabled, I'm not sure the click event would work.
 
I got it. Thank you. You're right!
 

Users who are viewing this thread

Back
Top Bottom