Results 1 to 4 of 4
  1. #1
    topp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    12

    Removing certain characters from field


    Hello All,

    I have a field that lists part numbers like 01-xxx-xxx, 01R-xxx-xxx, 02-xxx-xxx, 02R-xxx-xxx, 03-xxx-xxx and so on. What I need to try and figure out is if there is way to remove the first 3 or 4 characters from each part number if and only if it starts with a 01-, 01R-, 02- or 02R-. Basically I just want to check the field to see if it starts with those characters and if it does remove them so I am only left with the corresponding part number.
    01-xxx-xxx would become xxx-xxx and 01R-xxx-xxx would also be changed to xxx-xxx, whereas 03-xxx-xxx would be left alone and remain 03-xxx-xxx. Again I am not even sure if this is can be done in access or not but would love any and all input. Thanks in advance!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    It's certainly doable. Since you only want certain values changed, you can use the Replace() function to replace those values with an empty string ("").
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    topp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    12
    Paul thank you so much. That was exactly what I needed to get the job done!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problemo!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Wierd Characters in Field
    By RegVaz in forum Access
    Replies: 5
    Last Post: 01-17-2012, 01:46 PM
  2. Replies: 3
    Last Post: 12-28-2011, 01:45 PM
  3. Grab first characters from field
    By sau3-access in forum Access
    Replies: 1
    Last Post: 10-04-2011, 10:40 AM
  4. Replies: 9
    Last Post: 09-23-2010, 10:42 AM
  5. Counting Characters in a text field
    By velvettiger in forum Queries
    Replies: 1
    Last Post: 03-12-2010, 12:36 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