How do I create a custom Autonumber

apryor

Registered User.
Local time
Today, 06:31
Joined
Feb 11, 2005
Messages
31
I currently have a few tables that use an autonumber as the primary key, however, I would like the autonumber to start with a series of letters if possible. For example: instead of it creating an ID of 1, then, 2, 3, 4, and so on, I would like it to append lets say "ABC" to the front of it; ABC1, ABC2, ABC3, etc.

AP
 
This question is asked many times each week. The answer is don't store multiple attributes in a single columns. Leave the text and numeric data as separate columns. Use DMax() to find the highest value number for each of the text fields. Make the primary key contain both columns. Search the forum for details.
 
And, as an aside, remember that an autonumber does not guarantee that you will get consecutive numbers. It only guarantees a unique number.
 

Users who are viewing this thread

Back
Top Bottom