Creating an auto-incrementing serial number

K

Keith Woollacott

I am trying to create a database to record work carried out on our 43 sites.
Each record will have an autonumber ID, but it also needs an additional
reference number.

The number needs to be made up of 3 parts - the site reference number (7001,
7002 .... 7044), the last two digits of the year, and a number that is
incremented by 1 from the last used for that site. (e.g. "7003/07/001").

Any advice would be appreciated.

Keith W
 
J

John Nurick

Hi Keith,

Use three fields, one for each part. For the second part, set the
default value of the field to
Format(Date(), "yy")

For the third part, use one of the standard techniques for creating an
auto-incrementing number; searching these newsgroups (e.g. at
groups.google.com) will find them.
 
K

Keith Woollacott

John - I guess I was trying to be too cleaver for my own good!

Many thanks

Keith
 

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