Results 1 to 4 of 4
  1. #1
    thulot is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    12

    How do I Search for an Asterisk without Query Thinking It Is a Wild Card?

    Hello, everyone, I am using Access 2013 64-bit on Windows 10.

    A few years ago, I created a many-to-many database for my movie collection. Now, I need help creating a query, please.



    Some of the movie titles have asterisks at the end of them. I did this to designate which movies are duplicates. I know I can create a check box in the form for this, but until I get around to doing that, I am using asterisks.

    Now, what I want to do is create a query for every movie whose title contains an asterisk. Of course, it didn't occur to me until just now that an asterisk serves as a wild card in query searches. As a result, putting: like "*" doesn't work.

    So, could anyone please tell me how to set up the query criteria so the query will recognize the asterisk as an actual item to search for, and not a wild card?

    The table I am working with is called tblMovies, and the field in question is called Title.

    If you need more information, please let me know. Thank you. T. Hulot

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    put square brackets round it

    Like "*[*]*"

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    or use the instr function

    WHERE instr(Title,"*")<>0

  4. #4
    thulot is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    12
    The brackets worked. Thank you.

    I was dabbling and experimenting, and decided to try replacing the asterisks with plus signs. I then used Like "*+" and that worked, as well. So, now I know what to do for either character. Thanks again.

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

Similar Threads

  1. drill down and wild card criteria
    By Jen0dorf in forum Access
    Replies: 3
    Last Post: 02-12-2016, 12:12 PM
  2. QUERY: Date/Time with a wild card as criteria?
    By excellenthelp in forum Access
    Replies: 3
    Last Post: 04-21-2015, 03:06 PM
  3. Criteria from form to query with wild card
    By SteveW in forum Queries
    Replies: 3
    Last Post: 04-01-2011, 07:49 PM
  4. DoCmd.ApplyFilter with wild card
    By cksm4 in forum Programming
    Replies: 3
    Last Post: 10-05-2010, 08:24 AM
  5. Import with a wild card
    By ukgooner in forum Import/Export Data
    Replies: 3
    Last Post: 09-09-2009, 08:08 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