Refreshing Indexes

H

Harry V

I'm using Access 2002 and I'm wondering if there isn't a way to refresh all
the indexes to a table?
 
H

Harry V

Craig,

Is there a way of doing this programatically, say as a form is opened?

Harry V
 
C

Craig Alexander Morrison

As long as the database (that you want to compact) is not open and in use
you can use

DBEngine.CompactDatabase

Check usage in help but basically you need to give it the database source
and the target

You will need to rename the target to the source to continue using it as
before.
 
C

Craig Alexander Morrison

....should have added you will find help on the CompactDatabase (DAO) in the
VB editor (2003).
 
Top