Option Group

lizzieah

Registered User.
Local time
Today, 14:42
Joined
Mar 27, 2003
Messages
11
I put in a option group, thought it was the easiest way to go for my problem. I could set it to option buttons, set the default etc. But
I want to be able to make an event on click on one of the options. However im not giving this option, it doesnt include On Click to perform an even.

SO

I thought instead ill frame single options together. I can now perform on click events but i now dont know how to set one of the options as a default.

I know there will be some easy explaination. As i am just a begginer, im falling into all sorts of holes.
Any help appreciated
 
Lizzieah,

You can attach an onclick event to the option group frame (not the radio buttons themselves).

In the onclick event of the frame, you can first check the value of the selected button and action if needed.

eg:

Frame (Option Group) Name: Frame0
Radio Buttons: Option 1 (No Event) = 1 / Option 2 (Activate Event) = 2
Code:

Private Sub Frame0_Click()
If Me.Frame0 = 2 Then
MsgBox "Event has been activated." 'Your event goes here
End If
End Sub

Thus, the code activates every time an option is selected, but unless it is the desired selection, no action actually occurs.

HTH

Brad.
 

Users who are viewing this thread

Back
Top Bottom