Results 1 to 3 of 3

Using Replace() for special characters

  1. #1
    RayMilhon is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    940

    Using Replace() for special characters


    I have a section of code I wrote to migrate data from 1 database to a new database. Database was redesigned to be more efficient. However some of the fields are string fields and the users have included the " character when typing in the data. I tried using the replace to remove them but I'm not sure what the CHR code is for " I used 147 but that didn't work. anybody know the chr code for "?

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    2,507
    That would be CHR(34)
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Micron is online now VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    2,082
    You can use the Asc function to get the Ascii character number for practically any character, or there are lots of sites with character code charts for several unicode character sets. The double quote would be an odd one to get since the string passed to the function has to be in quotes. That one would be Asc("""").
    - "doesn't work" is no help.Error #s/text do. State what's happening.
    - Use code tags for code/sql; show where errors occur
    Make all suggested changes in copies of your database or to its objects

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

Similar Threads

  1. Special Delimiter characters
    By cliff.clayman in forum Import/Export Data
    Replies: 12
    Last Post: 09-13-2016, 09:52 AM
  2. Removing special characters
    By crowegreg in forum Queries
    Replies: 3
    Last Post: 02-26-2014, 10:56 AM
  3. Search for special characters
    By davej311 in forum Queries
    Replies: 3
    Last Post: 11-20-2013, 01:35 PM
  4. Need to delete special characters
    By tlrutledge in forum Queries
    Replies: 1
    Last Post: 08-23-2013, 02:10 AM
  5. Special Characters
    By orgelizer in forum Access
    Replies: 0
    Last Post: 03-20-2007, 07: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
  •  
Tech Forums: Microsoft Office Forums