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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding text to a text field with an option group 1

Status
Not open for further replies.

bfamo

Technical User
Feb 16, 2006
132
NO
Hey there

My form has an option group "CtrlOpt1" with 3 radio buttons, and a text field "txtField" below it.

For every time i choose an option in CtrlOpt1, the value returned is sent to txtField.

Code:
Private Sub CtrlOpt1_AfterUpdate()
Me.txtField = Me.txtField & Me.CtrlOpt1.Value
End Sub

Instead of adding a number to txt.Field, I now need CtrlOpt1 to add text. Instead of 1, 2 and 3, it should say <<First>>, <<Second>> and <<Third>> in plain text.

Any ideas as to how I can do this anyone?



 
You can use Choose:

[tt]Choose(CtrlOpt1,"First","Second","Third")[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top