| Chat with a LIVE Microsoft
Access Expert! |
||||
|
||||
|
#1
|
|||
|
|||
|
Hi,
I have a combo box which shows a list of data to report on - but there are times when I want to select all the data to report back on. How do I get the word all into the combo list to return all the information onto my report. |
| Sponsored Links |
|
#2
|
||||
|
||||
|
Have you considered a multi-select ListBox?
__________________
The Luddite Credo: If you don’t understand how it works, hit it with a hammer, and hit it hard. |
|
#3
|
||||
|
||||
|
Hmm,
You should be able to achieve something like what you describe, but it will, I think, require a fair bit of work. First off you want to get 'All' as one of the options in the row source for the combo box. Whether you already have a query or not, for the row source, you are probably going to need one now as the tone of your message suggests that you have not entered a list of data for the combo box (if you had then I figure you wouldn't be asking the question) which suggests that the list will need to be dynamic, rather than fixed. You will need to either:
You will need to consider creating an addtional query to handle the 'All' situation, which you could instigate when the user requests the report (I presume that the request is formally made by clicking a command button or on the 'after update' event of the combo). It might, however, be less complicated to request 'All' from a separate button than building the 'All' option into the combo box drop-down (although I do think that building the option into the combo is the neater solution, from the users perspective). HTH Tim |
|
#4
|
||||
|
||||
|
As Tim says, you'll have to write code to handle the "All" option for the combobox, depending on exactly what it is you're doing, but in order to get the "All" option at the top of your combobox, replace its RowSource by with this:
SELECT YourFieldName FROM YourTableName UNION SELECT "(All)" FROM YourTableName; Good Luck!
__________________
There's ALWAYS more than one way to skin a cat! |
|
#5
|
|||
|
|||
|
Thanks for that - I think I will try with the Multiselect list box first (as I am still learning) and will try out the other coding when I am more familiar.
Thanks for all your help. |
|
#6
|
||||
|
||||
|
Goog luck (and not meant sarcastically). I've been using Access now for half a dozen years and still haven't figured out about using multiple select in List Boxes, mostly because all of the advice I have seen was along the lines of 'there be dragons', so I'll be interested to see your solution.
|
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Single Select List Box | rerichards | Modules & VBA | 2 | 04-26-2005 10:23 AM |
| Cascading Combo Box Problem | clf | Forms | 1 | 06-23-2004 06:07 PM |
| How do I issue items from a multi-level inventory? | ltl | Forms | 5 | 01-27-2004 11:32 AM |
| Combo Box, Click to Select? | GoinDeep | Forms | 2 | 06-03-2003 09:33 AM |
| Allow the contents of one combo box to be determined the value of another | jmriddic | Forms | 1 | 09-18-2001 07:44 AM |