Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 12th, 2008, 08:43 AM
Registered User
 
Join Date: Jan 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Stripping Data from a Field

I have a License Number Field that I want to Strip all of the characters off except the last three numbers. I am new to Access and I thought there might be a function or code to do this.

My License Number will be like this in each row which contains about 13,000 records: 031-000818501-000. In this example, I want only the last three numbers left which in this case would be 000.

Any quick way to do this? I believe there is.

Thanks

jjc9809


Joel Carmack
 
Old July 12th, 2008, 08:16 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Right(fieldname,3)

If you'd like to first *check* that you have a dash followed by 3 digits, you could do that, too. But RIGHT (and LEFT and MID) functions and more are all available in Access SQL and in Access VBS coding.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Stripping CRLF?? crabjoe Classic ASP Basics 7 February 26th, 2008 05:58 PM
Stripping last X characters fixxer XSLT 2 September 21st, 2007 05:11 PM
Stripping hyphens arholly Access 2 January 4th, 2007 09:16 AM
regex for stripping space muki XSLT 2 February 8th, 2006 06:29 AM
Stripping down variable values mellan XSLT 1 September 19th, 2005 09:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.