Clear Database And Reset the AutoNumber

J

jillian.calderon

Good Morning Everyone,

I'm making a database and I'm playing with it using test data. When
I want to put the actual data in, how do I reset the autonumber back to
1? How do I tell the database to completely delete the fake records so
the autonumber doesn't start at, o, 50?

Thanks!
Jillian
 
D

Dirk Goldgar

Good Morning Everyone,

I'm making a database and I'm playing with it using test data. When
I want to put the actual data in, how do I reset the autonumber back
to 1? How do I tell the database to completely delete the fake
records so the autonumber doesn't start at, o, 50?

You can manually delete all the records and then compact the database,
or you can run delete queries on all the tables and then compact the
database.

Or you could create a new database and import all the objects from the
old database, but specify the option to import just the structure of the
tables, not the structure and data. I wouldn't normally do it this way,
though, because there are some things that don't get imported and have
to be rebuilt manually -- references, for example, and database
properties.
 
J

jillian.calderon

I didn't even notice there was a way to compact the database.
Thank you!!!
 
J

jillian.calderon

I'm not sure why I care, but it could be that I'm OCD. This is in fact
my first database, and that it'll contain well over 30,000 records made
me want everthing to be clear. Thanks for clearing up the inanity of
ordered autonumbers! They don't have to be in order. I was parinoid
because on of my forms wouldn't let me add a record because "The
changes you requested to the table were not successful because they
would create duplicate values...". Oddly enough, the suggestion to
compact the database eliminated the problem in addition to fixing my
relations. I didn't really need them to be in order. I just thought
access was taking up space with records that didn't exist.

Jill
 
D

Douglas J. Steele

By the way, I've seen your question in at least 3 separate newsgroups now.

If you feel you need to post to more than one group (HINT: it's seldom
necessary), please have the courtesy to cross-post (send the one message to
all groups at once), rather than multi-post (send individual messages to
each group). In this way, all responses to your post will be available
together, regardless of what group the responder was in, and the rest of us
won't have to read your post multiple times. (It also uses fewer server
resources)

I see you're using Google Groups. I'm not aware specifically of how to
cross-post there, but in general you should be able to type the names of the
various groups in the Newsgroup box, separating each newsgroup name with a
semicolon.
 

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