Programming Reference Manual
 
Syntax
 
Sequence$(OldNumber$)
 
Description
Increments the characters in the string oldnumber$.
 
It is common in database applications to utilize sequenced fields, perhaps to assign account or part numbers automatically. For example, if the last customer acount number on record is, say “AAA-0134-52”, the Sequence function will increment it to be “AAA-0134-53”. Likewise if oldnumber$ were “009-AABD-99”, Sequence would change it to “009-AABE-00”.
 
Sequence will increment the characters in any of the following three catagories: digits, upper case letters and lower case letters. Imbedded delimiters are unaffected, and “wrapping” will extend across any blanks or non-numeric/alphabetic characters.
 
Parameter
Description
oldnumber$
Patterned alphanumeric code to be iterated.
See Also
Example
 
Sub Main
    Debug.Print Sequence$(“A-999”)   ‘B-000
End Sub