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

Populate Text Box after user selects choice in a Combo Box

Status
Not open for further replies.

rkcksk

Technical User
Jan 31, 2003
3
US
I am a new developer struggling through the first application, so forgive me for the basic questions.

I have created a form where the user choses from a combo box to select their name (user_name). I would like a 2nd text box on the form to automatically display their employee id (cuid) without saving the info. I am having problems writing the expression.

Thank You.
 
Assuming that user id is the first couln of the combo, hidden in the usual way, in the after update eevnt of the combo put:

txtId = cboEE.Column(0)

using your own control names of course Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
If the rowsource for the combo box has the cuid, then this is easy.

Let's say you have to columns i the list, lastname and cuid.

On the After Update event of the combo box:

Me![Second TextBox] = Me![Combo Box].Column(1)

This is a little wierd in that the first column (lastname) is column(0). Then cuid becomes Column(1).

Good Luck! Anthony J. DeSalvo
President - ScottTech Software
"Integrating Technology with Business"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top