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!

group option boxes

Status
Not open for further replies.

shaman7800

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

any help will be thanked
 
use the onBeforeUpdate function in the form for the option group to change the values..make sure the option group is unbound and the text fields are hidded on the form...then:

Sub OnBeforeUpdate_optionGroup1() 'created by machine

if me.myOption.value = 1 then
me.myTextField.visible true
me.myTextField.value = "Boy"
me.myTextField.visible = false
elseif me.myOption.value = 2 then
me.myTextField.visible true
me.myTextField.value = "Girl"
me.myTextField.visible = false
end if

End Sub

Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top