Results 1 to 3 of 3
  1. #1
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287

    How to eliminate a (R) ® (registered trademark) from a string

    Hey guys,



    My manufacturer has thrown a curveball at me. They push a list of all active SKU's to us through an ODBC. We import those new SKUs into our Point of Sale database (called GERS if anyone is familiar). Everything has been fine and dandy for the past 7 years, until now. They started throwing in that circle R symbol ® on some of their newer products. Our POS system doesn't like that character and puts in a question mark in its place. The field in our POS system is the description of the item, which shows up on the customer's receipt. I don't need our products not being sure of themselves haha.

    Is there a simple VBA function that I can write that loops through every character in the description field (named DES in table ITEM)? If the character is any of the standard keyboard characters, use that, if not, delete the character (or use "" or something along those lines).

    Thanks for the help!

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    I think the Registered® Trademark Code is ASCII 169.
    You could try Replace(DES,"®"," ") to replace with a space.

    Code:
    Sub testj()
    Dim x As String
    x = "this is a test® with a non standard code"
    Debug.Print x
    x = Replace(x, "®", " ")
    Debug.Print x
    
    End Sub
    gives output
    Code:
    this is a test® with a non standard code
    this is a test  with a non standard code
    Dev Ashish has a function to check alphanumeric here. You could adapt as necessary.

    Good luck.
    Last edited by orange; 08-16-2014 at 08:11 AM.

  3. #3
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287
    That's exactly what I need!

    Thanks bud!

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

Similar Threads

  1. Replies: 9
    Last Post: 05-30-2014, 11:08 AM
  2. How to eliminate the text after and before the dash
    By Jerseynjphillypa in forum Queries
    Replies: 1
    Last Post: 06-15-2012, 10:58 AM
  3. Looking for code to eliminate Nul results
    By Jamescdawson in forum Queries
    Replies: 6
    Last Post: 02-25-2012, 03:42 AM
  4. OLE server may not be registered
    By Pnavarre in forum Access
    Replies: 1
    Last Post: 10-10-2011, 11:10 AM
  5. Can't eliminate Object Dependencies
    By skahle89 in forum Access
    Replies: 1
    Last Post: 12-02-2010, 11:21 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