Option button

  • Thread starter Thread starter Aniko
  • Start date Start date
A

Aniko

Hi,
Could you please help me?

I would like to add option buttons to a main form,
selecting the type of asset. When a particular option
button is clicked, I would like the corresponding submenu
being activated in a tab control. I will have as many tabs
as option buttons.

When I click an option button, I can activate the tab with
an event procedure, but the other option button does not
become inactive.

How can I toggle between option buttons? (eg, only make one
selected at a time)

Thank you,
Aniko
 
You could use an option group. It's located in the form design tool box.
Then for the option group set the after update event to see which option was
selected. You could use a select statement:

Private Sub optGroup1_AfterUpdate()
Select Case Me.optGroup1
Case 1
MsgBox "Option 1 selected"
Case 2
MsgBox "Option 2 selected"
Case 3
MsgBox "Option 3 selected"
End Select
End Sub
 
Back
Top