Compact once a day...

edster

Registered User.
Local time
Today, 08:54
Joined
Sep 25, 2004
Messages
31
Hi everyone,

hopefully you'll be able to help me out with this one, been searching but can't find the exact answer.

I am running a database with multiple users, max of 10, currently the database autocompacts when it is closed, however this takes time every time anyone closes it.

what i am looking to do is have the database automatically compact but only once a day. Any ideas???

many thanks
 
Using the taskplanner, make it open this VBScript:

Code:
Option Explicit

Dim Compacting

Const AccessPath = "C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE"
Const UserName = "MyName"
Const UserPassword = "MyPassword"
Const DBPath = "MyDatabasePath"
Const MdwPath = "MyMdwPath"

''''''''''''
Set Compacting = WScript.CreateObject("WScript.Shell")
Compacting.Run """" & DBPath & """ """ & DBPath & """ /wrkgrp """ & MdwPath & """ /compact /user """ & UserName & """ /pwd """ & UserPassword & """", 3, True
 

Users who are viewing this thread

Back
Top Bottom