Results 1 to 7 of 7
  1. #1
    eschroll is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Location
    Lihue, Kauai
    Posts
    3

    Need help with special characters in field, queries failing.

    Hi all!

    One of the fields in an existing Access 2010 db column is in the following format: #-#-###:###

    In trying to do a query with the [Enter TMK] criteria, nothing is returned. The idea is for the User to search for a specific TMK, and all of the records associated with it. There may be several records with the same TMK (different dates, actions, etc.).

    I can do a "Starts with", only enter the first # and it filters correctly. As soon as I put in a -, it will return nothing.

    I have tried formatting the field as a number and as text, with the same result. Help!



    I just want the User to put in, say, 2-1-234-007 into the [Enter TMK] query, and have the filter return all records containing that in the TMK column.

    Many, many thanks!!!!!

    Eric
    Attached Thumbnails Attached Thumbnails TMK Access.jpg  

  2. #2
    eschroll is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Location
    Lihue, Kauai
    Posts
    3
    Make that example query 2-1-234:007

    Typed too fast :/

  3. #3
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Have you tried Like "2-1-234:007"

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Are you using an input mask? Are those values actually saved with the punctuation?
    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.

  5. #5
    eschroll is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Location
    Lihue, Kauai
    Posts
    3
    When I try Like "2-1-234:007" in Find, nothing is returned. When I try it in the Query with the [Search TMK] criteria, it errors with incorrect or too complex.

    There is an Input Mask of #\-#\-###:###

    Thanks, all!

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    That input mask does not force saving the punctuation. The actual data does not have the hyphens and colon. Try search on 21234007 and see what happens.

    If you want to save the punctuation, input mask for a text field:

    #\-#\-###:###;0;_
    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.

  7. #7
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    What is the data type of the TMK field? In your screen capture above, the column is right-justified, indicating it is numeric (long integer). If that is the case, you won't be able to store the punctuation in the data at all - you would need a text field.

    John

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

Similar Threads

  1. Removing special characters
    By crowegreg in forum Queries
    Replies: 3
    Last Post: 02-26-2014, 11:56 AM
  2. column alias name with special characters?
    By btappan in forum Queries
    Replies: 3
    Last Post: 02-15-2014, 02:22 PM
  3. Search for special characters
    By davej311 in forum Queries
    Replies: 3
    Last Post: 11-20-2013, 02:35 PM
  4. Need to delete special characters
    By tlrutledge in forum Queries
    Replies: 1
    Last Post: 08-23-2013, 03:10 AM
  5. Special Characters
    By orgelizer in forum Access
    Replies: 0
    Last Post: 03-20-2007, 08:24 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