My Assistant
|
|
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.
|
|
|
|
![]() |
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! |
|
|
|
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 Top · Lo-Fi Version | Time is now: 18th May 2013 - 07:01 PM |