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

Access help needed with Combo Boxes looking up values from a query

Status
Not open for further replies.

JP2275

Technical User
Sep 23, 2005
4
US
My situation is this:

I have a form where I created a combo box that selects an Employee Name from a query. When a user selects the name from the combo box, I want to be able to auto-populate other boxes on the form with other fields related to the Employee that are also fields within the query the combo box is pulling from (i.e. department, title, etc).

After I create the combo box, I am able to see the list of names determined by the query ok. My problem is how and what type of boxes do I create on the form to be able to show the other data I want? And how do i bind them to the combo box to make sure they are populating with the correct information?

Any help is greatly appreciated! I've tried using the wizard for this and searching through the help pages, but nothing seems to clarify this for me.

Thanks!
~JP
 
You may consider playing with TextBox you populate in the AfterUpdate event procedure of the combo.
Tip: have a look at the Column property of the ComboBox object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
try a text box which looks at the staff table

JOBTITLE is the field you wish to display
STAFF is the table that holds the information
STAFFCODE is the staff code reference in the ref table

ME.STAFFCODE is the value held against the combo box on your current form.

=dlookup("jobtitle","staff","staffcode='" & me.staffcode & "'")

This should change as soon as the value of the combo box is changed.

Hope this helps.
Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top