Form - Autonumber generation

tintin16

Registered User.
Local time
Yesterday, 23:51
Joined
Jul 14, 2004
Messages
12
I have a datalabel that generates a serial number for the record entered automatically.

Can i do something, to get the number to start from zero, for every calendar year, without making any changes in the form.

Please help me out with this. :)
 
I have bad news for you. The only way to get the Autonumber to reset is to make a new table.

It is never a good idea to use the Autonumber data type if there could ever be a need to change or specify the next number generated.

The only purpose of the Autonumber is to be unique, and it tries very hard to maintain its uniqueness.
 
Query?

Can i use a query to reset the serial number?

i dont think i can use different tables as it has to be linked to the same form.
 
What you're going to want to do is go into the design of the table, and change it from being an autonumber to just a regular number.

Then you can write an event procedure to calculate the next one if you like.

If you are determined to continue with the autonumber, here's what to do.

  • backup your database.
  • Make a new table with all the exact same fields as the first one
  • make an append query based on the first table aimed at the second one
  • tell it to append all fields _except_ for the autonumber one
  • run it
  • delete your old table and rename the new one to match it


But you really should just change the autonumber type to regular number
 
Thanks,,,

I dont prefer the autonumber either.
I need a number to indicate the serial number of the document generated in a year. This number is used as part of the document id, which is used in the same form.

Is there any other way, for the user to find out the serial number correctly, without going back to the form.

or

Is it possible to store the data in different tables for every year??? ( i dont think I am making sense)
 

Users who are viewing this thread

Back
Top Bottom