How do I get a variable to = the value of a query, then from that variable run another query to display a list of all records with that have that value.
I am not sure where to start, any ideas will help.
Thanks
This will be used in a double click search box. The goal is to double click on one record, from that record have it run a query to display an associated item from a seperate table. Then find all records that have the same property.
eg: Double click on a [Wire ID] from a list box on a form.
(Query1) finds the [Room #] that the selected [Wire ID] is located in, and displays it in a window on the same form.
(Query2) then finds all of the [Wire ID]s located in the [Room #] from (query1) and displays them in a window on the same form.
We are trying to figure out the code for getting (Query2) to reference the output [Room #] from (Query1)
Give your users a drop-down box that has 2 columns: [Room #] and [Wire ID]. The bound column being the [Room #], but the records being sorted by [Wire ID]. You could even hide the [Room #] column from them.
The Row Source of your list box (where you would get a list of all wires for the room in question) would be something like this, then:
Select [Wire ID] from [myTable]
Where [Room #] = Forms![myForm].[myCombo].Value
Order by [Wire ID]
When you change the combo, do a requery on the list box.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.