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!

really simply question...

Status
Not open for further replies.

Zandor435

Technical User
Jan 23, 2003
70
US
I have a been away from Access for a while and I have a general question.

I am having a problem w/ one of my forms. I want all the informatiom on a form to change dynamically to correspond to a selection from a combo box on the form.

ie. When the user selects from a combo box of userID, I want the other info (name, home address etc,) to change accordingly.

I know this is simply, but i have not been able to get it right yet. Thanks for any help you can give.

Zach
 
You'll need to use the dlookup function. If you need help with how it works let me know.

John Green

John Green
 
The last poster was correct. Here is a detailed ex. In this ex, the table is auditor. The fields are auditor ID, division, name. The goal is to make a pulldown for auditor ID that refreshes a text field with the division in it.

1) create the combo box (combo1). Choose the "remember for later use" option when the wizard asks you. Remember to select "limit to list" property after you make the combo box. Otherwise users can type in values.
2) create a text field (text1). Leave control source blank for now.
3) create a macro (macro1). It has one action, requery. The argument is text1.
4) on combo box after update event, select macro1
5) now, the tricky part. text1's control source should be =DLookUp("[division]","auditor","[auditor id]=Forms![Form1]![Combo1] ")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top