Results 1 to 3 of 3
  1. #1
    ajk825 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Posts
    15

    Help with textbox filter please...

    Hi... I have a project that I am required to write using Ms Access 2013. It involves filtering a table using a textbox instead of the Search box provided in the navigation strip. I have it working, but I'm not happy with it...I'm currently using a Macro set up with a button to filter the text box on the buttons OnClick() command. The Where clause is this:


    WHERE = [RECIPE]![RecipeName] Like [Forms]![RECIPE_FEED_BK_FORM]![lookUpTxtBx]


    Which filters the table as I hoped...but the name I am looking for must be spelled exactly as it is in the database or it does not work...Isn't there a way for it to narrow the search as I type? I mean that if I type an "a" all the records starting with "A" appear. If I add a "p" then it is "Ap"...and so on.... Is this possible and what would be the best way of doing this? Thank you in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Could try a combobox instead of textbox. Combobox autoexpand property will match to listed items as you type.

    LIKE without wildcard might as well just be = sign and the = sign you have shouldn't even be there.

    WHERE [RECIPE]![RecipeName] Like "*" [Forms]![RECIPE_FEED_BK_FORM]![lookUpTxtBx] & "*"
    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.

  3. #3
    ajk825 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Posts
    15
    Had to use a textbox, but thank for the above it cleared it right up for me... had the wild cards in the wrong spot..

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

Similar Threads

  1. Replies: 2
    Last Post: 04-20-2013, 03:37 AM
  2. Replies: 8
    Last Post: 04-12-2013, 08:59 PM
  3. Filter and Sort a form based on TextBox Values.
    By Ramun_Flame in forum Programming
    Replies: 7
    Last Post: 10-28-2012, 06:53 AM
  4. Need to Filter Query with textbox
    By jmshipe in forum Access
    Replies: 2
    Last Post: 08-12-2012, 05:46 AM
  5. Replies: 1
    Last Post: 12-04-2011, 06:33 PM

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