find a field autonumber automatically and delete and rebuild,how?

A

ahmed tharwat

Dear,

I need your help for find a field autonumber automatically
To delete it and re build it automatic
And I call it maintenance the mdb application
I wait your help
With my best regards
Ahmed tharwat
 
A

Allen Browne

The simplest way to do this would be to create a new table, and import the
data from your old table (with an Append query.) Once you've verified the
data is okay, you can delete the old table, compact the database, and then
rename the new one to the old name.

Be careful though: if the autonubmer is primary key, and other tables relate
to it, you will lose touch with which record relates to which.

If you are asking how to programmatically find the autonumber field, see:
http://allenbrowne.com/func-DAO.html#GetAutoNumDAO
http://allenbrowne.com/func-ADOX.html#GetSeedADOX
 

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