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

hi, i am having a problem with option boxes

Status
Not open for further replies.

shaman7800

Technical User
Feb 19, 2002
6
US
i know that if i use an option box the value will be stored 1, 2, 3,etc. in the table, my question is how do i change this value to text? ex. if 1 = boy, if 2 = girl.

any help will be thanked
 
Shaman:

You can use a little vba code in the background. Say for example, I have a textbox on a form that you want to show "boy" or "girl" but all you have for a record is 1 or 2, which is the value stored in the underlying table.

You can use a Select Statement that populates your text box on the "On Current" event of the form, e.g.,

Select Case Myoptionbutton
Case = 1
MyText = "girl"
Case = 2
MyTExt = "boy"
End Select

There are other approaches you could take, and if this is not sufficient, give a little more detail and we'll discuss further.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top