By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,092 Members | 1,546 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,092 IT Pros & Developers. It's quick & easy.

AutoNumber Sequence Change in Same Table

P: n/a
The AutoNumber sequence in my database is currently formatted as
'000000'. When a new record is created, the AutoNumber would go from
000001, 000002, 000003 and so on. I want to track via AutoNumber the
year each record was created.

Basically, if a record was entered in 2003, the AutoNumber would look
something like 03-000001 and then 03-000002, and so on.

When a record would be entered in 2004, the AutoNumber would look
something like 04-000001 and then 04-000002, and so on.

Hopefully it can all be within the same table.

How do I do this?
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Charles Robinson III" <ro******@saiyanprincefox.cjb.net> wrote in message
news:va********************************@4ax.com...
The AutoNumber sequence in my database is currently formatted as
'000000'. When a new record is created, the AutoNumber would go from
000001, 000002, 000003 and so on. I want to track via AutoNumber the
year each record was created.

Basically, if a record was entered in 2003, the AutoNumber would look
something like 03-000001 and then 03-000002, and so on.

When a record would be entered in 2004, the AutoNumber would look
something like 04-000001 and then 04-000002, and so on.

Hopefully it can all be within the same table.

How do I do this?


Bad idea. "smart keys" will almost always give you trouble down the road.
Let the autonumber do what it wants, record the year or date in another
field.
Nov 12 '05 #2

P: n/a
Autonumbers don't 'mean' anything. It's just a convenient way for you to get
Access to generate a unique identifier for you. And the default is a long
integer where each new record has a number which is USUALLY the highest
number +1. But it can be a GUID if you want. But don't try and use them for
anything apart from unique ids. Don't show them to the users.

Mike

"Charles Robinson III" <ro******@saiyanprincefox.cjb.net> wrote in message
news:va********************************@4ax.com...
The AutoNumber sequence in my database is currently formatted as
'000000'. When a new record is created, the AutoNumber would go from
000001, 000002, 000003 and so on. I want to track via AutoNumber the
year each record was created.

Basically, if a record was entered in 2003, the AutoNumber would look
something like 03-000001 and then 03-000002, and so on.

When a record would be entered in 2004, the AutoNumber would look
something like 04-000001 and then 04-000002, and so on.

Hopefully it can all be within the same table.

How do I do this?

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.