Option Groups don't have Values like "Yes" and "No," their Values are Integers! If the Label on your first Option Button is "Yes" and the Label on the second Option Button is "No," this code should do the job:
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
Simply replace YourOptionGroupName and YourCommandButton with the actual names of your Controls.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007