Autonumber with YY-MM

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
 
D

Douglas J. Steele

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top