Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Option group selection

Status
Not open for further replies.

PB90

Technical User
Jul 11, 2005
65
0
0
US
I have a form with an option group. I want to change the caption on a cmdbutton if a particular radio button is selected. Which event would I put the "opt.caption =xx" in? (mouse down, key down, key up, key press??)
 
Hi PB90

I will usually use the onMouseUp event.

Ron

-Isn't it great when it works the first time?
 
How are ya PB90 . . . . .

Believing the [blue]Option Values[/blue] are 1,2,3 ect . . . try this is the [blue]AfterUpdate[/blue] event of the option group:
Code:
[blue]   Me![purple][b]ButtonName[/b][/purple].Caption = Choose(Me![purple][b]OptionGroupName[/b][/purple], "Text1", "Text2", "Text3")[/blue]
or
Code:
[blue]   If Me![purple][b]OptionGroupName[/b][/purple] = OptionValue Then
      Me![purple][b]ButtonName[/b][/purple].Caption = "YourText"
   End If[/blue]



Calvin.gif
See Ya! . . . . . .
 
Thanks Aceman1 & Greely,

Aceman1, I believe that is exactly what I'm looking for, will know soon.
Thanks
PB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top