Results 1 to 2 of 2
  1. #1
    S1naps1s is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    8

    Search in a string


    Is there a way that I can search for certain characters in a string?
    Basically, if a DLookup returns "January Holiday", "February Holiday", etc...
    If it contains the word "Holiday" I want it to display in a form field as "H"
    To me it would be similar to using "* Holiday" in a windows search. How would I go about doing this?

    Thanks 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,770
    Maybe use an IIf() expression:

    IIf([field or textbox] Like "*Holiday*", "H", "something else")
    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.

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

Similar Threads

  1. Replies: 1
    Last Post: 03-26-2014, 03:38 PM
  2. Query To Search Text String
    By JeffGeorge in forum Queries
    Replies: 2
    Last Post: 08-15-2013, 10:56 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. Search string for 2nd, 3rd, 4th... occurance
    By broecher in forum Queries
    Replies: 10
    Last Post: 10-26-2010, 12:03 AM

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