Option button

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
 
R

Reggie

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top