force the value in txtBox to result of query

pungentSapling

NeedHotSauce?
Local time
Today, 18:02
Joined
Apr 4, 2002
Messages
115
How can I set the value of a text box on a form to the result of a query ?
The query criteria comes from a combo box on a form , the text boxes I want to populate are on the same from.

alternatively I would like to have the result of the query go directly into the table that are the txtBoxes control source.

p.
 
You could use the query result of the first combo box as a rowsource for a second combo to select the required field - Cascading Combo's (I believe Hayley is an expert on this topic).

OR:

Another theory:

Use the after update event of the Combo to activate:

me.fieldnametostorein = dlookup("requiredfield","queryname","id = etc if necessary")

If you list the actual field / query details, it could be more specific.

Brad.
 
thanks I ended up using a solution quite like your first suggestion.
 

Users who are viewing this thread

Back
Top Bottom