Originally Posted by
mmg
...I have an option group with "Yes" and "No"...
Option Group Values are Integers, not "Yes" and "No." If the first Radio-Button is labeled 'Yes' and the second one is labeled 'No,' the code would be
Code:
Private Sub YourOptionGroupName_AfterUpdate()
If Me.YourOptionGroupName = 1 Then
YourCommandButton.Enabled = True
Else
YourCommandButton.Enabled = False
End If
End Sub
Private Sub Form_Current()
If Me.YourOptionGroupName = 1 Then
YourCommandButton.Enabled = True
Else
YourCommandButton.Enabled = False
End If
End Sub
You'll need to replace YourOptionGroupName and YourCommandButton with the actual names of your Controls, of course.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007