(Q) I'm using an Option Group on my form but I don't like the fact that it will only
store numbers. How can I have the Option Group store strings?
(A) Option groups cannot store string values. You're limited to using numbers with
them. However, with the use of a simple Select Case statement, you can control what's
shown to the user.
For example, suppose you have an Option Group "ctlOption" which has 3 options
with in it. Using the AfterUpdate event of the option group, you can assign strings to
different controls.
Sub ctlOption_AfterUpdate()
Select Case me!ctlOption
Case 1:
Msgbox "One was Selected"
Case 2:
Msgbox "Two was selected" Case 3:
Msgbox "Three was selected" End Select
End sub
|