Results 1 to 2 of 2
  1. #1
    Whit is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Apr 2018
    Posts
    7

    Locate Extended ASCII characters


    I need to locate records in a table when one of its fields contains any character other than 0 to 9, A - Z, and a - z. I use the following query:

    select RecordID, field1 where field1 like "*[!a-z0-9]*"

    The query locates all records where field1 has any character in it other than 0 to 9, A - Z, a - z AND the decimal value of the character is 127 or less.

    When there is a character in field1 with a decimal value of >= 128, the above query does not ALWAYS select that field. It works for some characters above 128 but not for all. It seems like the above filtering statement of where field1 like "*[!a-z0-9]*" should select all instances of the decimal value of the character being 128 or greater, not just some.

    Any suggestions how to get all of the records where field1 has a character other than 0 to 9, A - Z, a - z including all of those with a decimal value of >= 128?

    Thanks Whit PS The characaters over 127 that the query does not select are listed below.
    orgdec orgchar
    131 ƒ
    138 Š
    140 Œ
    153
    154 š
    156 œ
    159 Ÿ
    170 ª
    178 ²
    179 ³
    185 ¹
    186 º
    188 ¼
    189 ½
    190 ¾
    192 À
    193 Á
    194 Â
    195 Ã
    196 Ä
    197 Å
    198 Æ
    199 Ç
    200 È
    201 É
    202 Ê
    203 Ë
    204 Ì
    205 Í
    206 Î
    207 Ï
    208 Ð
    209 Ñ
    210 Ò
    211 Ó
    212 Ô
    213 Õ
    214 Ö
    216 Ø
    217 Ù
    218 Ú
    219 Û
    220 Ü
    221 Ý
    222 Þ
    223 ß
    224 à
    225 á
    226 â
    227 ã
    228 ä
    229 å
    230 æ
    231 ç
    232 è
    233 é
    234 ê
    235 ë
    236 ì
    237 í
    238 î
    239 ï
    240 ð
    241 ñ
    242 ò
    243 ó
    244 ô
    245 õ
    246 ö
    248 ø
    249 ù
    250 ú
    251 û
    252 ü
    253 ý
    254 þ
    255 ÿ

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Build a VBA custom function and call it from query.
    Code:
    Function testS(strT As String) As Boolean
    Dim j As Integer
    For j = 1 To Len(strT)
        If Asc(Mid(strT, j, 1)) > 128 Then testS = True
    Next
    End Function
    SELECT table1.* FROM table1 WHERE TestS([Test]) = True;
    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. Displaying non ASCII characters in a recordset
    By toothpaste in forum Programming
    Replies: 3
    Last Post: 02-06-2017, 02:57 AM
  2. Layout for Controls extended.
    By Perceptus in forum Forms
    Replies: 11
    Last Post: 11-12-2015, 03:00 PM
  3. Converting a text string to its ASCII value
    By Access_Novice in forum Access
    Replies: 4
    Last Post: 03-19-2015, 10:28 PM
  4. OpenTextFile, unicode/ascii
    By dssrun in forum Programming
    Replies: 4
    Last Post: 11-23-2011, 01:22 PM
  5. Calculate Multiple Fields for Extended Price
    By SRessler in forum Queries
    Replies: 3
    Last Post: 11-01-2010, 03:57 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