Use query result ID, Query ONLY returns one record

Kryst51

Singin' in the Hou. Rain
Local time
Today, 03:53
Joined
Jun 29, 2009
Messages
1,896
I have a query, this query pulls its information from a form and returns ONLY one record (which is what I want it to do), This record is then displayed in a listbox (listbox is based on the query) because it looks nice, on the form and verifies that a record has been found, I want to use the ID from this query and assign it as an fk in another table. I can't figure out how to get that value.... Now I could "select" the record in the list box, and that works, but I don't want to have to select the record, as there is only one option. Is there a way to do this?
 
I can't see any other option unless you just use a hidden text box with a Dlookup to the query as the control source and then you can refer to the text box value.
 
I can't see any other option unless you just use a hidden text box with a Dlookup to the query as the control source and then you can refer to the text box value.

Great Idea! I'll try it! Thanks!
 
Hey Bob,

The DLookup worked wonderfully, Thank you!
 
Hey Bob,

The DLookup worked wonderfully, Thank you!

Cool, glad we could help.

yourewelcome2.jpg
 

Users who are viewing this thread

Back
Top Bottom