Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007

    Question Unanswered: Search to find part of text box contents

    Hi All,

    I have a "Search" button which searches a "Name'" textbox. What would be appropriate code to search the text box to match part of it's contents. For example, the textbox contains both a first and last name. EG Smith, John. When I type "smith" into my search box, I would like it to obviously pull whatever records match "smith". Thanks!

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    use the like construct
    Access JET uses * and _ as wildcards
    or you cna use the ANSI SQL wildcard % if you have selected that as an option

    smith anywhere in column called name
    WHERE name LIKE "*SMITH*"
    name starts with JOHN
    WHERE name LIKE "JOHN*"
    name ends with SMITH
    WHERE name like "*SMITH"
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts