This will only work if the order of the fields in all the queries is such
that the bound column you want in the listbox is in the same field position
in all the queries and the field you want to display in the listbox is in
the same field position in all the queries. If not, you need to store this
information in your table of queries also.
Assuming the above conditions are met, all you need do is make sure the name
of the query is the bound column in your combobox and then in the
AfterUpdate event of the combobox, put this code:
Me!NameOfListbox.Rowsource = Me!NameOfCombobox
Me!NameOfListbox.Requery
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com www.pcdatasheet.com
"Seth Delaney" <sa******@excite.com> wrote in message
news:27*************************@posting.google.co m...
I have a form with a combobox and a list box. The combobox will list
records (names of queries) that are entered in a table called
tblListName. I have the combobox set to get its values from this
table. tblListName has two fields: ListName and QueryName where
QueryName is the actual name of the query and ListName is a "friendly
name" to be displayed. No problem, I'm good so far.
However, I have trouble here: I want the listbox to list records (same
fields for each query) from the query that was selected in the
combobox.
Any help is appreciated... I've done an exhaustive search on this
group and have yet to find the solution.
Thanks