Resetting autonumbering in the New Year

E

Etta

We have 35 controlled documents that are issued throughout the year,
generally in packages of 10 to 25. Each controlled document has its own
control number, which is set by the database based on date of issue. So, for
document Walking the first package of 10 issued in 2008 had numbers 08-0001
through 08-0010, and the numbers changed each time a package was issued.
This works fine.

But now 2009 is approaching and I wonder if there is a way to reset the
numbering system so that on January 2, 2009 when the document Walking is
issued, the documents can be numbered 09-0001 through 09-0010.

Please feel free to ask questions about my question. I've attempted to be
as clear as possible. Your help and advice will be greatly appreciated.
 
M

Marshall Barton

Etta said:
We have 35 controlled documents that are issued throughout the year,
generally in packages of 10 to 25. Each controlled document has its own
control number, which is set by the database based on date of issue. So, for
document Walking the first package of 10 issued in 2008 had numbers 08-0001
through 08-0010, and the numbers changed each time a package was issued.
This works fine.

But now 2009 is approaching and I wonder if there is a way to reset the
numbering system so that on January 2, 2009 when the document Walking is
issued, the documents can be numbered 09-0001 through 09-0010.


You should post the code you are using to increment the
sequece numbers.

Assuming that the sequence number and year are properly
designed as two separate fields in the table, the common
approach would use code like this in the form's BeforeUpdate
event procedure:

Me.yearfield = Year(Date)
Me.sequencefield = Nz(DMax("sequencefield", "thetable", _
"yearfield = Year(Date) And " _
& "documentfield = '" &Me.documentfield & "' "
 

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