Results 1 to 6 of 6
  1. #1
    Draconius is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    5

    Filtering data on form through multiple combo boxes

    I have a Table (Mail_Type) that has two columns ("SLA" and "Doc_Type"). I am trying to create a form when a certain SLA is selected (1st combo box), then only certain Doc_types will show under the 2nd combo box. I followed this aid (http://www.datapigtechnologies.com/f...combobox1.html and http://www.datapigtechnologies.com/f...combobox2.html), however the 2nd combobox is completely empty and showing no results. I attached multiple screen shots below to try and show everything...I am an access novice so I can't figure out all the steps.

    My Table that shows Name, and column names


    What my form would look like:


    My first combo box code that groups the SLA's into their common name (This works perfectly and shows correct when I run it)


    My second Combo Box code shows...this doesn't work. It won't show anything when I try to expand it when using the form, and when I try to run it, it comes up with a blank table with only the SLA column (which is also blank)


    Attached Thumbnails Attached Thumbnails Mail_Type table.jpg  

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    First, make sure you are requerying the second combo in the after update event of the first. It appears you have an "apples and oranges" comparison going on. The criteria in the second combo is on the doc type field. I'd expect it on the SLA field, and I doubt you need the Total row activated.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Draconius is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    5
    hi pbaldy,

    Thanks for the quick response. The requery right now is on the bottom of my list, because when I run the row source on the second combo box (3rd picture) it comes up blank. That is my first need. Could you further explain your "apples and oranges" reference? I set up my table the same way the video that I linked shows, so it should have just been a differentiation to his names to my names.

    Also, the criteria in the video showed that it should be on the 2nd combo box and to reference the 2nd results and not from the first...(does that make sense?)

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The second combo won't work without the requery of the first, so it needs to be in there. You are choosing an SLA in the first combo, so your second combo should say, in English, "give me the doc types with the SLA matching the first combo". What you have is "give me the SLA's with a doc type matching the first combo", the opposite of what you want. Maybe this will be easier to understand?

    Baldy-Cascading Combos
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Draconius is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    5
    Thanks pbaldy! Seeing your sheet helped out a lot. The data fields now are selected!

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Excellent! Happy to help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 06-12-2012, 11:49 AM
  2. Replies: 5
    Last Post: 03-12-2012, 02:58 AM
  3. using multiple combo boxes in one form
    By quandore in forum Access
    Replies: 5
    Last Post: 01-30-2012, 03:03 AM
  4. Error with filtering subform using 2 combo boxes
    By dharmacloud in forum Forms
    Replies: 4
    Last Post: 08-22-2011, 10:46 AM
  5. Filtering options using Cascading Combo boxes
    By Lincoln in forum Database Design
    Replies: 3
    Last Post: 07-15-2011, 08:25 PM

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