Is there a way to create a serial number generated On creation using the format
Account Name - + next value
ex. 4-1000 4-1001 4-1002 etc
SerialNumber: AutoEnter = Serial increment by 1.
CustomSerial: AutoEnter = Get(AccountName) & "-" & SerialNumber.
If you want a different sequence for every account, this is indeed possible bu not something that I’d use for a primary key.
What id the purpose to such a key?
A self join matching by account name can return the max value to which you then add one.
Thank you Phil.... I was using the Primary Key in the order table as the Order Number as well. Probably not a good idea. I will auto generate the Order Number on it's own.
I'll try the self join... thank you.
The ideal primary key:
a) Always unique and never changed once assigned to new record
b) Implemented in as simple and "bulletproof" a fashion as possible
c) Does not contain any "encoded meaning" (such as your account name)
If project requirements specify an identifier that does not meet those standards, I set it up as a "label" field for use in searching and sorting, then add a hidden primary key that meets the above standards to use for establishing relationships in the relationship graph and "joins" in SQL queries.
Retrieving data ...