reservedbcreater said:
i have an autonumberfield for questionid
i screwed up on #47 on a different field (question text) so i just
deleted the record
now when i try to do it again it skips 47 and autonumbers the record
48.
help?????????
Why do you care? Autonumbers exist for the sole purpose of generating a
unique key for a record. The value of an autonumber should never be
used to mean anything. Autonumbers, by their very nature, will develop
gaps in the
sequence whenever a record is deleted, or when a user begins to create a
new record and then decides not to save it.
Most often, autonumbers shouldn't be shown to the users at all (though I
have been known to do it, just to give the users a handle to identify a
record that wasn't otherwise easy to single out). But if you care
whether the autonumbers have gaps, then you are already assigning them
more meaning than you ought.
If your application requires a sequential question number, then you
should use some other mechanism to generate those numbers so that no
gaps will develop. There are various schemes for doing that, from
simple ones that only work for a single-user database, to more complex
ones that can be safely used when multiple users will be adding records
to the table. A Google Groups search will doubtless turn these up.