reset autonumber field.

K

Kim

Is there a way to repair/ compact the mdb file through VBA
code? I am a temp and need to make this system as self
controlling as possible, as it is, a button is pressed to
do the year end clearance, there are reasons for this
decision. So in that button_click routine I would have to
include the instructions to carry out the repair/compact.
 
D

Douglas J. Steele

Assuming you've got the standard front-end/back-end setup, check whether the
back-end is currently open (look to see if the LDB file exists). If it
doesn't rename the back-end, and either use the DBEngine's CompactDatabase
method (requires a reference to Microsoft DAO 3.x Object library, ), or the
JetEngine's CompactDatabase method (requires a reference to JRO, the
Microsoft Jet and Replication x.x Object library)

If you mean you want to compact the current database, it's not possible. You
can take a look at the free TSI SOON (Shut One, Open New) database add-in
Michka has at http://www.trigeminal.com/utility.asp?ItemID=8
 

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