UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Autonumber style with text in front of it    
 
   
kccgm
post Feb 15 2007, 06:40 PM
Post #1

New Member
Posts: 1



Just wondering if anyone knows how to Auto increment with text in front of it. Example.. (EX001..EX002..EX003). I want it to automatically increment on the number portion, but with text prior to it.
Go to the top of the page
 
+
jwhite
post Feb 15 2007, 07:25 PM
Post #2

UtterAccess VIP
Posts: 4,622
From: North Carolina, USA



Welcome to UA -o!

NewNum = LEFT("EX001",2) & format(val(Mid("EX001",3)+1),"000")

Replace "EX001" with your control/field name, depending on where you want this to go.

Please note that this will only allow numbers 001 - 999!
Go to the top of the page
 
+
NoahP
post Feb 16 2007, 08:45 AM
Post #3

Retired Moderator
Posts: 10,493
From: Lexington/Louisville KY USA



If it's always going to have 'EX' as the prefix, you don't need to store the text part at all. You'll have to use DMax + 1 to get the incremental number piece.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th June 2013 - 07:14 AM