423,680 Members | 2,439 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,680 IT Pros & Developers. It's quick & easy.

How to select single item or All items from Combo Box

P: 38
Hello friends

I need your help. I have a small database in ms Access 2007. Here is the scene.
I have 1 combo box to select Company Name........... this is working OK
Upon company selected it display Region Name.......... this is also working OK
Upon Region Selection it display Territory Name....... this is also working OK
and I get the data of Required Territory.
Now I want to Add "*" to Select All Territory. I dont know how to do it...

If any one can help me..... Thanks in advance.
Irshad Ahmed Malik
2 Weeks Ago #1
Share this Question
Share on Google+
3 Replies

Expert Mod 2.5K+
P: 2,666

There may be a very simple way to do this. In your Territories Table, have a "territory" that has the index of 0 with the Territory Name of "All Territories". When you build the query for your Combo Box Row Source, the criteria will be
Expand|Select|Wrap|Line Numbers
  1. "Region = " & [RegionComboBoxName] & _
  2.     " OR TerritoryIndex = 0"
You will have to fix the smart quotes if you want to cut and paste, as I am responding on my iPad and it automatically inserts smart quotes.

Then, if someone selects "All Territories" you adjust your additional queries accordingly.

Hope that hepps!
2 Weeks Ago #2

Expert Mod 15k+
P: 31,084
Just to be clear for those finding this thread based on the title - It is not possible to select all items from a ComboBox at one time.

It is possible to select an item that represents all other values from the list, but not to select all at once.

This is possible using a ListBox control instead, but not with a ComboBox.

You can ignore this post. Twinny has given what I suspect is all you need. Let us know if you still need further help.
1 Week Ago #3

Expert Mod 2.5K+
P: 2,666
How are you coming along with this issue?
1 Week Ago #4

Post your reply

Sign in to post your reply or Sign up for a free account.