Use listbox selection for query criteria

  • Thread starter Thread starter stale_dry_one
  • Start date Start date
S

stale_dry_one

I have a listbox that shows a list of regions, I am trying to create
a query that will use the listbox selection to only show records that
are in that region. I want to use this query as part of a second
query. Can anybody help with this?

Thanks,
steve
 
In your query, refer to the listbox using the syntax
Forms![NameOfForm]![NameOfListbox] (where you replace NameOfForm and
NameOfListbox with your actual names)

Note that this will only work if the form is already open when the query
runs (Access will not open the form for you), and the list box cannot have
multiselect enabled.
 
In your query, refer to the listbox using the syntax
Forms![NameOfForm]![NameOfListbox] (where you replace NameOfForm and
NameOfListbox with your actual names)

Note that this will only work if the form is already open when the query
runs (Access will not open the form for you), and the list box cannot have
multiselect enabled.

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)






I have a listbox that shows a list of regions, I am trying to create
a query that will use the listbox selection to only show records that
are in that region.  I want to use this query as part of a second
query.  Can anybody help with this?
Thanks,
steve- Hide quoted text -

- Show quoted text -

Thank you for the advice, I have noticed a change to my form, I have 2
other listboxes that allow multiple selections, and I see that the
functionality for these boxes have changed. I can no longer select a
value in listbox2 and have it show in listbox3 as a criteria.

Does this seem right?

Thanks,
Steve
 
I have no idea what you're asking! What do you mean by "select a value in
listbox2 and have it show in listbox3"?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)



Thank you for the advice, I have noticed a change to my form, I have 2
other listboxes that allow multiple selections, and I see that the
functionality for these boxes have changed. I can no longer select a
value in listbox2 and have it show in listbox3 as a criteria.

Does this seem right?

Thanks,
Steve
 
Back
Top