I went through that and it doesn't do quite what I would
like it to do. I would like it to automatically throw up
the two digit year, then dash and generate an autonumber
at the end. When I was using the KB file, you have to
predermine numbers in a seperate table. The access
autonumber is fine the way it works, I just want it to add
the two digit year to the beginning of it.
Thanks for you help.
The autonumber field type generates values that are not intended to serve as
anything other than unique record identifiers. What you want can only be stored
in a text field. The method provided by the KB article is pretty much how to
approach what you want, but there are other methods using code and sql to
perform the same task. If you want to give the appearance of a record identifier
using an autonumber field, you can save the 2 digit year value in a separate
text field and either place it to the left of the autonumber field control when
displaying it, separating the two by a "-", or display the whole "number" in a
calculated control everywhere you need to display it using a text box with a
"Control Source" property set to something like this:
=[txtYear] & "-" & [MyAutonumberField]
Incidentally, autonumbers are notorious for gaps in values due to deleted
records or records that were started, but not saved (the record was "undone" in
the form instead of saving) and once that has been done, that "next value" has
already been used up. If that is not acceptable for your purposes, you will need
to generate your own incrementing numbers on-the-fly (one approach is
demonstrated in that KB article and is similar to the approach that I use for my
incremental number generating implementations).