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

Multiple Data Fields from a Combo Box 3

Status
Not open for further replies.

mpnorris

IS-IT--Management
Dec 31, 2002
66
US
I am new to using Access with a little VB experience.

I have created a form where I am choosing a user from a combobox. The combobox is being populated by a query. After choosing a user name I am trying to carry over two of the data fields (User ID and Department) that appear in the combobox to another form when clicking the "Continue" button. The continue button is to open another form and pre-populate two text boxes on the new form.

If anyone has any suggestions or sample code to view I would appreciate any response.

 
Sorry, one of my replies must have gotten lost. Click the OnCurrent event for the form properties and recopy this code into the FormCurrent sub it creates for you:

Me.txtDeptID = mintDeptID
Me.txtU_ID = mstrUID
Me.txtUser_ID = mintUserID
Me.txtDeptName = mstrDeptName
Me.txtFirstName = mstrFirstName
Me.txtLastName = mstrLastName

This will reset them every time you go to a new record.

Good Luck!
 
THANK YOU! I think we are good for now. I will let you know if there is anything else. You have been a tremendous help. I may finish this project after all. Keeping my fingers crossed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top