Results 1 to 3 of 3
  1. #1
    JeffGeorge is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    111

    Query To Search Text String


    I have created a form where a person can enter a text string. I want to use their input as the source for finding that string in a given field of a table. What would I use as the criteria for the associated query?

  2. #2
    kazaccess is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    43
    SQL for this:

    SELECT *
    FROM TableName
    WHERE FieldName Like "*" & Forms![FormName]!TextBoxName & "*"

    Replace the bold with your information
    This will return all records with the text box value found anywhere in the field.

  3. #3
    JeffGeorge is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    111
    Great! I was trying to figure out how to incorporate the wildcard characters but couldn't quite figure it out. Thanks.

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

Similar Threads

  1. Replies: 3
    Last Post: 12-22-2012, 05:33 PM
  2. Text String from Form Query - Multiple Choices
    By wrandyrice in forum Access
    Replies: 1
    Last Post: 08-12-2012, 10:58 AM
  3. Search for a String in VBA code.
    By dandoescode in forum Access
    Replies: 3
    Last Post: 06-21-2012, 11:00 AM
  4. Replies: 11
    Last Post: 02-03-2012, 12:04 PM
  5. Replies: 1
    Last Post: 02-02-2012, 06:22 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