Hi,
I'm developing an application where I want to provide a user with the option of Repairing/Compacting a database.
I've never done this before so I'm not sure if I'm on the right track. The database I'm trying to repair is "CatalogDB.mdb" and it's in the same directory as my application.
Does my code below look approximately right?
Me.Application.CloseCurrentDatabase
DBEngine.RepairDatabase app.path & "\CatalogDB.mdb"
DBEngine.CompactDatabase app. path & "\CatalogDB.mdb", app.path & "\CatalogDB.mdb"
I have this code under a command button and when I click on the button my form closes and my project stays open. To be honest, I'm really not sure whether it's working.
Thanks for any help.
MBaddar
I'm developing an application where I want to provide a user with the option of Repairing/Compacting a database.
I've never done this before so I'm not sure if I'm on the right track. The database I'm trying to repair is "CatalogDB.mdb" and it's in the same directory as my application.
Does my code below look approximately right?
Me.Application.CloseCurrentDatabase
DBEngine.RepairDatabase app.path & "\CatalogDB.mdb"
DBEngine.CompactDatabase app. path & "\CatalogDB.mdb", app.path & "\CatalogDB.mdb"
I have this code under a command button and when I click on the button my form closes and my project stays open. To be honest, I'm really not sure whether it's working.
Thanks for any help.
MBaddar