Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compacting backend database in the frontend. 1

Status
Not open for further replies.

djmc

Programmer
Jun 12, 2002
179
CA
I splitted my access application into frontend and backend. I would like to know how I can compact my backend database from my frontend via a button click.
 
Not sure you can since I believe you can't access the file while compacting. Take a look at FMS Inc.'s Total Access Backup, I believe it includes a scheduled compact option.
 
Hi,

Create a DOS batch file with the network path of your back end database and add the switch /compact like:

w:\file\MyDB.mdb /compact

With a RunApp macro executes your batch file.

jp@solutionsvba.com


Jean-Paul
Montreal
mtljp2@sympatico.ca
 
Isn't there some way of doing it in VBA where I open the db, compact, and close the db connection?
 
I believe you can do this with the DAO CompactDatabase method.
You will need to ensure that NO records in the BE are open. ie no tables, queries, forms, or reports in the (any) Front-End are open.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top