Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2013
    Posts
    6

    Question Unanswered: Combo Box Option ALL

    In my form I have a combo box with a value list of 5 options, (On Hold, Cancelled, In Progress, Completed, and Submitted). My query on the Status Column is based on the selection I have in the combo box on the main form.

    [Forms]![Main]![cmbStatus]

    I would like to have an option in the combo box for "All" to show all of the status's

  2. #2
    Join Date
    Nov 2010
    Posts
    84
    Why in your value list does not add value "All".
    Value list will be (On Hold, Cancelled, In Progress, Completed, Submitted, All).

    We strongly recommend that your databse introduce a new table Status(StatusID, StatusName).
    Last edited by eremija; 07-30-13 at 18:44.

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    As eremija suggested, just add 'All' to your Combobox RowSource. In Form Design View:
    • Right-Click the Combobox
    • Click on Properties
    • Click on the Data Tab
    • Modify the Row Source Property to the below:

    "On Hold";"Cancelled";"In Progress";"Completed";"Submitted";"All"

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Jul 2013
    Posts
    6
    I am not wanting to add a status called "All". This combo box is used to show all of the projects currently in those statuses. I would like an option the the combo box that will show the results of all of the statuses (On Hold, Cancelled, In Progress, Completed, Submitted).

    No entry in my database will have a status called "all"

  5. #5
    Join Date
    Jan 2005
    Posts
    146
    First, follow this advice:
    We strongly recommend that your database introduce a new table Status(StatusID, StatusName).
    Second, as the rowsource for your combobox use this:
    Code:
    SELECT StatusName FROM Status UNION SELECT "All" FROM Status;
    This will show all your choices from the table and add the 'All' that you want. then, in the Combobox AfterUpdate event add something like:

    Code:
    If Me.ComboStatus = "All" Then
    'remove your filter or set your criteria to "*" to show all records
    End If

  6. #6
    Join Date
    Jul 2013
    Posts
    6
    I set up the tables, take a look at my setup, I'm still a little confused on how to make the combo box show all results. Sorry for the confusion, I'm still learning Access.
    Attached Files Attached Files

  7. #7
    Join Date
    Jan 2005
    Posts
    146
    Unfortunately I'm not familiar with the newest version of Access which has a lot of automation and relies on Macros so I had to redo your Main form. With my version you don't use queries or multiple subforms, it is all handled with VBA. Although it is best to set up tables to store value lists, I used your Region list for the filtering.
    Attached Files Attached Files

  8. #8
    Join Date
    Jul 2013
    Posts
    6
    Thank you, I was able to make this work perfectly!

  9. #9
    Join Date
    Jan 2005
    Posts
    146
    Your welcome, I'm glad it worked for you.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •