AutoNumber Fields - how to set them to start at zero

I

Ian Millward

Hi there,

I have a small group using a split DB. There are some other members of the
group who do not have remote access to the server so, to keep them
up-to-date, I have a single DB, containing the same tables as the BackEnd
DB, which can be replenished, using a button, and a copy is sent by e-mail
to these members of the group. This is a once a week operation.

I need to use the Append rather than the Replace approach in order to keep
my table links intact.

In my routine, I cycle through the tables emptying them then I cycle through
again and Append the data from the BackEnd tables. So far, so good but,
after a few weeks of this, the Prime Index resembles a telephone number .
This is because the replenished table starts the autonumber index of the
replenished data as one more than the highest number of the data I have just
deleted.

What I want to do is to empty the tables, then compact the database then
replenish the data.

I can't do this.

In code, I can empty, then replenish, then compact OK, using the
"accDoDefaultAction" method to simulate the action of clicking the "Compact
Database" menu. Problem is, I can't do the compact bit in between the empty
cycle and the replenish cycle.

It is just a function of Access 2000 that it won't allow this in VBA.

Does anybody know of a work-around which might resolve this little
inconvenience.

Many thanks,

Ian Millward
Edinburgh
 
A

Allen Browne

After you delete the data, use ADOX to set the Seed property of the Column
in the Table.
 

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