Help needed to add 'ALL option' to list box

Ginny2222

Ginny
Local time
Today, 09:39
Joined
Oct 27, 2007
Messages
108
Can anyone point me to where I might get help setting the above up. I have a list of unique enties in a query, and have set up a global variable so that on my form when I choose an option from the list only data relating to that option is pulled back from a number of tables/queries and output on a report. I would like to be able to get the data for my full list of options. I'm afraid I'm lost here. I don't know of any way of setting my variable to 'ALL'. Is this available in Access 2000? I have Access 2002 at home but I need to work on a PC that only has Access 2000, so I have kept it as a 2000 database. All help appreciated.

rgs
Ginny
 
How are you populating the list box?
 
It's linked to a query, which pulls distinct values from a table. Thank you for your reply.
 
Hi Ken, thanks for that. Yes, I can get that far. I now have 'All' or '*' in my option list, and I am presuming that this is now set as my variable, but how do I get this to pull back my data when I run the form? I get nothing ! ! When I use '*' in my queries (manually), all data gets pulled back. What can I set my variable to, to achieve this?
 
In your query pull back to columns, one is your original list and the other is the original list plus the all. The combo box will display the all column and be bound to the other column. Now in the query your criteria will be something like:

like "myComboBoxName" & "*"

Make sense?

:)
ken
 
Ken, I have a global variable set up as GBL_paCode. In my Forms OnOpen Event I have set the variable to the "ComboBoxName". In all of my queries I have used the Criteria 'get_Global("GBL_paCode")'. GBL_paCode takes each of the variables separately, but I cannot find a way to pass "All" to it.

rgs
Ginny (thanks for taking the time on this).
 
Looks good, but could you show me an example of it running a query with the option chosen.

I'm whacked - so I mightn't get back to this tonight.

rgs
Ginny
 
It drives the query that populates the list box. The only thing that is a bit diffucult to understand is the union query...
 

Users who are viewing this thread

Back
Top Bottom