Gary,
Correct. This is how Jet autonumber fields work.Quote:>When adding a new record to a recordset that has an autoincrement id the
>value increases even if the the process of adding the record was cancelled.
Can't do it. If you need this functionality you'll need to use yourQuote:>I would like to put the number back to it's previous value if I cancel the
>update to the new record.
own key-generating mechanism.
Basically the numbers generated in an autonumber field aren't supposed
to "mean" anything. They happen to increment upwards by one, but their
PURPOSE is simply to provide a guaranteed unique value which is
suitable for use as a primary key or unique index. They should not be
used as pseudo-record numbers or as series numbers, such as
CheckNumbers or InvoiceNumbers and so forth.
-- Jim Ferguson, FMS
http://www.fmsinc.com