Results 1 to 3 of 3
  1. #1
    ntambomvu is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Johannesburg south africa
    Posts
    91

    find recds having certain substr

    Hello There
    I am sure this has been asked before by i dont know the terminology.
    I have a field in my table called "Keywords". this field contains a string
    made up of different words . so a record called "food" could have the
    following content in Keywords "breadmeatbuttermilkeggsjamfruit"
    (the string may be as long as 128 characters).
    what is the command and syntax in the query for the keywords column
    if I only want records containing "eggs"
    (I used to program in dbase and the function was $"eggs" which translates
    to string contains the substr "eggs")
    Help will be sincerely appreciated
    Regards
    Fred Evans

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,818
    Use the LIKE operator in the keywords field of the query design grid. LIKE "*eggs*" will find a record with that word. You have to consider the effect of wildcards and their placement because *egg* will also find begging and arpeggio.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Join Date
    Apr 2017
    Posts
    1,687
    Code:
    SELECT * FROM YourTable WHERE Instr(Keywords,"eggs")>0

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

Similar Threads

  1. Replies: 6
    Last Post: 04-16-2018, 09:15 PM
  2. Can I find anyone here to help me?
    By Accountant in forum Access
    Replies: 6
    Last Post: 08-31-2017, 02:30 PM
  3. Replies: 3
    Last Post: 12-04-2016, 03:16 PM
  4. Find first won't find
    By lawdy in forum Programming
    Replies: 7
    Last Post: 12-15-2013, 02:00 PM
  5. I can't find the bug. Please help
    By sharVyn in forum Programming
    Replies: 5
    Last Post: 08-27-2012, 03:39 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