If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Use listbox selection for query criteria
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 |
#2
|
|||
|
|||
Use listbox selection for query criteria
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 MVP http://I.Am/DougSteele (no e-mails, please!) "stale_dry_one" wrote in message ... 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 |
#3
|
|||
|
|||
Use listbox selection for query criteria
On Nov 3, 2:01*pm, "Douglas J. Steele"
wrote: 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!) "stale_dry_one" wrote in message ... 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 |
#4
|
|||
|
|||
Use listbox selection for query criteria
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 http://I.Am/DougSteele (no private e-mails, please) "stale_dry_one" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|