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!

Populating text field help needed!

Status
Not open for further replies.

SCubed

Programmer
Jan 6, 2004
26
US
Based on the selection in a combo box, I need to execute a query that will read a different table based on the selection made, then populate a text box field on the form.

EXAMPLE:

AssetID is my combo box.
User selects an AssetID in the list.
After the selection is made, I need to query my MOVE table to determine the previous location of the Asset.
The Previous Location then needs displayed in my textbox field on the form.

Thank you in advance!
 
What is the previous location?

Say the user selects an asset, say 12345.

Do you have a table that says something like

Asset location
12345 in the basement

If so, a dlookup would do the trick.

If so, an event procedure based on after update from the combo box, which says forms!formname.Textbox = dlookup ...

Is this what you need?

ChaZ
 
I tried to figure out how to use the DLookUp, but my problem seems to need more complexity...

Yes, I have another table that says were my Asset is located...sort of. I actually have a table of ALL the locations where my Asset has been moved. I need only the latest one. I can get the latest one using sql, but I don't know how to attach it to this field to get the result of the query in my text box.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top