Append Query

G

Guest

I did an append query. Table A doesn't show any of the added records from
Table B, but the auto numbers jump from 1808 to 3038. Can I get rid of those
unseen records from 1809 to 3037. My Table B is still the original one and
hasn't changed. Is it possible to recover Table A before I tried the append
query?
 
J

John W. Vinson

I did an append query. Table A doesn't show any of the added records from
Table B, but the auto numbers jump from 1808 to 3038. Can I get rid of those
unseen records from 1809 to 3037. My Table B is still the original one and
hasn't changed. Is it possible to recover Table A before I tried the append
query?

Depending on the version of Access, you can delete the records above 1808 and
Compact the database.

However.... this is just in the nature of autonumbers. An autonumber has one
function, and one function ONLY: to provide a unique key. They are not
designed to be gapless; deleting a record, hitting <Esc> while entering a
record, or (as you have found) running an append query will "use up"
autonumber values and leave a gap. If you Replicate your database all
autonumbers will become random - 3037 might be followed by -1950038125 and
then by 418226453. Generally autonumbers should be kept "under the hood", used
for linking tables only and not exposed to the user. If you want
human-meaningful sequential numbers, use a Long Integer field and manage the
incrementing yourself in code.

John W. Vinson [MVP]
 

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