create form that resets the autonumber value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi, i want to know if it is possible to create a form which resets the
autonumber value in a table. i am trying to design a database which has
'ticket number' as the primary key. the best way to do this since most of the
ticket numbers are serial is to use an autonumber field. thing is that the
company which prints the tickets for us sometimees skip numbers and end up
distorting the numbers, or we send some batches of these tickets to other
branches ... get the drift. so i want to know if it will be possible to
design a form with a kind of subform which can change the autonumber value if
need be...thanks in advance
 
Autonumbers are not used in this manner. The autonumber field is used when a
primary key can not be created with any other records field data. If you use
the autonumber as a primary key and you do manage to change the value, you
will corrupt your related records (assuming no relationships exist). If you
have relationships set between tables and referential integrity has been set
and you do not have cascade update checked, Access won't let you change the
values.
If you need to maintain repetitive numbers, you need to create code that
will increment the Ticket Number to the next value. As soon as you create a
new Ticket Number, you need to update a table that updates the previous
number to the current number through an update query.
 
Back
Top