Results 1 to 5 of 5
  1. #1
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291

    Adding an "ALL" option to a combobox that has values from a table

    I think this has a simple answer.



    Situation:
    I have a table that has individual values: Blue;Green;Red;Orange; and I use this table in several locations in my program, including a combobox which you could choose one of those values.

    What I want:
    I also want to be able to select an ALL option in the combo box.

    Problems:
    I dont want to add ALL to the original table because that will ruin it where it is used in other parts of the program.
    I also dont want to put in a straight value list because the combobox is then not transferable to other situations.

    Possible solutions:
    1 - make a query that will list all the values I want and also add to that list another value of "ALL" (I dont know how to do this)
    2 - Use an SQL statement in the RowSource that will use "ALL" then the values from a given table. (I dont know how to do this)

    Any help is appreciated, thanks.

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    Could you just leave the combo box blank for 'All' or do you actually want to be able to select it.

  3. #3
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291
    I would prefer to have the word "ALL" there, if not I would have to have a lablel that would explain that the empty space meant "ALL" and even then someone would get confused and not use it correctly.

  4. #4
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    In that case the only way I can think to do this is create a new table for the 'All' record and create a union query to bring them together.

    In the example below I have created 2 tables both with just 1 field, 1 table has the colours in and the other just has 'All', then I have created a union query:

    SELECT ColourAll.ColourAll AS Type FROM ColourAll UNION SELECT Colours.Colour AS Type FROM Colours;

    Hope that helps

  5. #5
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291
    Worked well enough, thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. replace values with "indicators"
    By JoeMap in forum Reports
    Replies: 3
    Last Post: 06-16-2010, 10:19 AM
  2. Replies: 1
    Last Post: 05-13-2010, 10:50 AM
  3. Creating "Edit Record" link in table column
    By joshearl in forum Forms
    Replies: 1
    Last Post: 12-25-2009, 11:17 AM
  4. Replies: 21
    Last Post: 06-03-2009, 05:54 PM
  5. change values after checkbox "YES"
    By DonLduk in forum Forms
    Replies: 1
    Last Post: 10-03-2008, 04:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums