how recent autonumber on a field

D

dlb1228

I have a field called session id and it is autonumber filled in increments.
Someone here copied it for another purpose and made some slight changes. so
the deleted all the data in the tables thinging it would start over to
session 1 but i continues with the next session #. Is there a way to make
it go back to 1?
 
J

Jeff Boyce

Microsoft Access Autonumbers are intended as unique row identifiers. They
are generally unfit for human consumption. They are NOT guaranteed to
remain sequential, and you can cause a "missing" value by starting a new
record then cancelling.

If you need a number that humans can see and understand, consider creating
your own "sequence/ID" number (search on Custom Autonumber).

Why do you care what the unique (internal) row identifier is?

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
B

BruceM

You could compact and repair the database (Tools > Compact and Repair). I
think this only works pre-2007, but I'm not sure about Access 2007 one way
or the other. Back up the database first.

More to the point, you should not be exposing the autonumber except in very
limited circumstances. If you are counting on an incremented number with no
gaps you will almost surely be disappointed.

On another point, users should not be able to work directly with tables.
Data entry, editing, etc. should be by means of forms. Use reports for
printing. Users can and do click through messages warning them that they
are about to delete records. To some users an error message is something to
be dispensed with as quickly as possible, regardless of what it says. One
user here clicked through two messages saying that all data in the record
would be deleted, even though the default choice in the message box was not
to delete, yet still complained bitterly when it wiped out his data entry.
Even with warnings some users delete records, assuming everything will be
restored as long as they don't save (as if Access was Excel). At the form
level you can have control over this, but much less so at the table level.
 

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