If you search this group on "autonumber" you'll find a lot of advice.
Autonumber is a field type that is really a long integer, with some hidden
code
to increment the value for every added record. I do NOT recommend
any of these pseudoID forms that use combinations of initials/date/other,
as they ALL will eventually fail and most are vulnerable to user input
mistakes.
Trying to "imbed" data within an ID is almost always a bad idea.
Most good data designs have a primary key for each table,
generally an autonumber field. Most applications do not display that ID, but
use it internally for relational integrity. If you want to show the records
entered in any particular year,
you should be using a query to filter records based on a real date range.
That said, one of the more common solutions for what you ask, is to
concatenate
2 fields in the format that you require. Keep the standard autonumber
field, then add a [DateEntered] field
to your table and data entry form. Make this a date/time field type and set
the default value to Date().
This will automatically enter the system date anytime a new record is added.
On your forms/reports
that need the pseudoID displayed, create an unbound textbox and set its
control source to something like:
=DatePart("yyyy",[DateEntered])&[AutonumberFieldName]
-Ed
"the hotshot" <ho*****@inbox.lv> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
hello,
this seems to be a hard question so far and noone has been able to help
with this. is it possible to have access start an autonumber with a
prefix according to the year when the data is entered. for example, if
i entered something in 2004, i would like the number to bigin with
2004003, 2004004, 2004005... and same for 2005001, 2005002...?
much and great appreciation for suggestions.
thank you,
the hotshot