When deleting address and wanted the ID to be reduce too

  • Thread starter Thread starter TC
  • Start date Start date
T

TC

I have all my address in Access 2002. I would like to
delete some address from my data base. But the number is
like 131 address. If I delete some the numbers will still
continue. If I delete 6 then I put in four more then my
count will still be at 135 and not 129.
Does anyone know how to make it show that the actual
number and not the number of address have been entered?
Thank you very much.
TC
 
I have all my address in Access 2002. I would like to
delete some address from my data base. But the number is
like 131 address. If I delete some the numbers will still
continue. If I delete 6 then I put in four more then my
count will still be at 135 and not 129.
Does anyone know how to make it show that the actual
number and not the number of address have been entered?
Thank you very much.
TC

You're apparently confusing an Autonumber primary key with a count. IT
ISN'T. An Autonumber has one purpose and one purpose ONLY - to provide
an almost-guaranteed unique key.

For this reason, once a record is assigned an autonumber, that number
is "used up" and will never be reassigned. Similarly, the value in a
record will remain the same no matter how many other records are
deleted or changed.

Consider a typical multitable database: if you had an address table
linked to thirteen other tables, and instead of 131 addresses you had
224981, your suggestion would require that when Address 2 was deleted,
you would edit every single one of the other 224978 records... and all
the records in all the linked tables, and all the printouts which have
those numbers on paper, and all the pencil-written Post-It notes, and
all the brains containing a memory "I've got to go fix that mistake in
Address 33128 tomorrow".

If you want to count records, use a Totals query and count records.
Don't attempt to use an Autonumber for this purpose!
 
So what will I use to tell how many are in my address
book. It just keeps going up ID on the first colnum.
Thank you.
TC
 
Go to Queries, New. Select the address book table. Drag
the ID field (or any other field that doesn't have any
nulls)to the query grid. Click the Totals tool (Sigma
symbol on the toolbar) to add the Total: row. In the
Total: row select Count from the dropdown box. Run the
query.

Roxie Aho
(e-mail address removed)
 
Back
Top