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

Having trouble populating a field from a combo box

Status
Not open for further replies.

Ryker7

MIS
Jun 19, 2003
44
0
0
US
I have a form the contains two boxes. Social security number and name. The social security number box is a combo box that contains the two fields, social security number and name. I select the social security number I need (which populates the social security box), then exit the box. I am wanting to automatically populate the name box(name) with the corresponding name from the social security combo box. How do I do this?
 
I assume you have a combobox (combo1) and a textbox (text1)

Set the name column as the bound column in combo1.

In the afterupdate event handler for combo1 put:
text1.setfocus
text1.text=combo1
text1.requery
combo1.setfocus

Cheers,
John
 
Alternatively, in the On Exit event of combo1:

Me.text1 = Me.combo1.Column(1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top