Autonumber with YY-MM

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I need to create an Autonumber field that will be prefixed
with the current Year (YY) and Month (MM).

So, instead of having a record id that is "0001", "0002",
or "0003" for the first 3 records, I'd like to have the
system create "08-20-0001" (or maybe "08200001"), "08-20-
0002", "08-20-0001" as the primary key.

How can I achieve this?

Thanks,
Tom
 
Are you asking can you have both fields in your Primary Key? If so, the
answer's yes (you can have up to 10 fields in an index). Of course, the
AutoNumber field itself will be unique, so there's really no need to have
both in the Primary Key.
 
Back
Top