A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Use listbox selection for query criteria



 
 
Thread Tools Display Modes
  #1  
Old November 3rd, 2009, 08:49 PM posted to microsoft.public.access.forms
stale_dry_one
external usenet poster
 
Posts: 3
Default 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  
Old November 3rd, 2009, 09:01 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default 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  
Old November 4th, 2009, 04:34 PM posted to microsoft.public.access.forms
stale_dry_one
external usenet poster
 
Posts: 3
Default 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  
Old November 5th, 2009, 11:51 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.