Use query result ID, Query ONLY returns one record (1 Viewer)

Kryst51

Singin' in the Hou. Rain
Local time
Today, 02:18
Joined
Jun 29, 2009
Messages
1,898
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?
 

boblarson

Smeghead
Local time
Today, 00:18
Joined
Jan 12, 2001
Messages
32,059
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.
 

Kryst51

Singin' in the Hou. Rain
Local time
Today, 02:18
Joined
Jun 29, 2009
Messages
1,898
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!
 

Kryst51

Singin' in the Hou. Rain
Local time
Today, 02:18
Joined
Jun 29, 2009
Messages
1,898
Hey Bob,

The DLookup worked wonderfully, Thank you!
 

boblarson

Smeghead
Local time
Today, 00:18
Joined
Jan 12, 2001
Messages
32,059
Hey Bob,

The DLookup worked wonderfully, Thank you!

Cool, glad we could help.

 

Users who are viewing this thread

Top Bottom