Results 1 to 6 of 6
  1. #1
    Mik2045 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    30

    An advanced search form with multiple combo boxes


    So, I have an advanced form with 4 combo boxes and 1 field for a date.

    In this form I'd like to be able to choose an option from one or more comboboxes and create a report of all of the records matching those criteria.

    Is there a way to do this?

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Yes. You could use vba and a series of ifs (or select case) to determine what the user has selected, then create sql to search for the requested information.
    You may find some examples at Datapig
    http://www.datapigtechnologies.com/f...earchform.html
    http://www.datapigtechnologies.com/f...tomfilter.html

  3. #3
    Mik2045 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    30
    I was following them for a little while but I don't think that's what I wanted.

    Is there a way to use Advanced Filters or maybe a place I could get the VBA code for the advanced form?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    Your options are a parameterized query as demonstrated by DataPig or a lot of VBA code as demonstrated by http://www.allenbrowne.com/ser-62.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Mik2045 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    30
    Thanks June. I actually found that already and I gave it a test. I wasn't so sure how I would implement it onto my DB but I will give it a try and tweak the code to my needs.

    Thanks again.

  6. #6
    Mik2045 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    30
    Wow!

    I did it! After 4 hours of working I got it to produce correct results from my criteria.

    Now I need it to produce those results into a report. Any suggestions?

    EDIT: Nevermind I got it!

    Problem solved!

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

Similar Threads

  1. Filter a Form with Multiple Combo Boxes
    By Njliven in forum Forms
    Replies: 6
    Last Post: 01-03-2013, 01:25 PM
  2. Replies: 5
    Last Post: 07-26-2012, 02:30 PM
  3. using multiple combo boxes in one form
    By quandore in forum Access
    Replies: 5
    Last Post: 01-30-2012, 03:03 AM
  4. Search Form - Cascading Combo Boxes
    By WeeTerrier in forum Forms
    Replies: 7
    Last Post: 12-05-2011, 08:26 PM
  5. Filter form from multiple combo boxes
    By Bird_FAT in forum Programming
    Replies: 6
    Last Post: 05-19-2010, 09:32 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