Results 1 to 4 of 4
  1. #1
    MSG56 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    29

    Using a combo box in a search form

    I'm creating a search form for a food recipe database. I would like to be able to search for recipes based on several different criteria. I’ve created a test form with only two unbound text boxes that works exactly as expected. I’m using the LIKE property in the query in a way that allows me to leave the text box blank and return all the records. Or type part of a word and return all records containing the entered text.



    For some of the parameters that I wish to search it would be easier to limit the search items by using a combo box in place of the unbound text box. When I convert one of the text boxes to a combo box the query no longer works as expected. If I don’t select anything in the combo box, all is good as the query still returns all records. However, if I select any item in the combo box the query comes up blank. What I’m I doing wrong?
    Attached Thumbnails Attached Thumbnails TestSearchForm.png  

  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,652
    My guess is that the bound column of the combo is the ID field, which would give you an apple to oranges comparison.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    qa12dx is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    india
    Posts
    112
    should work. i'm guessing the "search now" cmd button triggers the query. what is the method you are using here? also a suggestion, don't have query criteria's when possible. use the apply filter. that way you can use the same query at many places and filter the content as required at that form, report, etc.

  4. #4
    MSG56 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    29
    Sorry for the delayed response - been busy and haven't worked this in a while.

    I started tinkering with this again today and I've resolved my initial problem, but I'm not quite sure how that happen. Now, I'm on to the next issue.

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

Similar Threads

  1. Search Combo Box on Form
    By Rhubie in forum Forms
    Replies: 15
    Last Post: 03-15-2013, 02:40 PM
  2. Replies: 7
    Last Post: 08-08-2012, 03:28 PM
  3. Combo Box Search Form
    By timbo in forum Forms
    Replies: 2
    Last Post: 04-25-2012, 02:56 PM
  4. Replies: 1
    Last Post: 04-20-2012, 03:16 AM
  5. Combo Search Form
    By Filmnoir in forum Forms
    Replies: 26
    Last Post: 01-26-2012, 10:12 AM

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
  •  
Other Forums: Microsoft Office Forums