Results 1 to 3 of 3
  1. #1
    shoelesscraig is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    53

    Query Based On Combos

    Tried searching for this, but didn't find what I was looking for...

    I have a table, just call it "Table1". It has many fields, but one of them (called "Field1") has several possible entries that could be in it...or it could be blank depending on the particular record. The text that was entered into this field was done by a form that limited the possible entries to a few...for example, "Option 1", "Option 2" and "Option 3".

    Here's my dilemma. I have a form where by I would like to run a query ("Query1"). Also on that form is a combo box where the user can select "Option 1", "Option 2" or "Option 3". I would like it so that if the user selects "Option 2" and then runs the query, the query will return every record from Table1 where Field1 = "Option2". Obviously if they select "Option 1", I want all records where that is the case. I believe I can figure this out no problem....BUT...I would like for the query to return ALL entries if the user leaves that combo box blank...as in, makes no selection at all.



    Is there a way to do this?

  2. #2
    shoelesscraig is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    53
    I've tried several options, and can get it to return what I want IF I select something from the combobox...but when I leave it blank, the query returns nothing at all. I assume leaving it blank is NOT the same as really being blank, but I'm not sure what it's doing!

  3. #3
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Can we see the query you are using please


    Sent from my iPhone using Tapatalk

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

Similar Threads

  1. Multiple unbound Combos
    By SteveApa in forum Forms
    Replies: 7
    Last Post: 02-20-2015, 02:07 PM
  2. Trying To Join 2 Combos
    By aamer in forum Access
    Replies: 7
    Last Post: 09-23-2014, 05:39 PM
  3. Combos and Queries
    By glenn91 in forum Queries
    Replies: 3
    Last Post: 03-19-2013, 10:34 AM
  4. Cascading combos issue
    By Andyjones in forum Programming
    Replies: 5
    Last Post: 04-14-2012, 11:09 AM
  5. Combos
    By AdventureBob in forum Forms
    Replies: 1
    Last Post: 01-20-2012, 08:54 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