Self sufficient Database

S

Steven Revell

Hi,

I have a database which i currently have to open and run a
macro on everyday. I was wondering if it is some how
possible to automatically open up the database at a
certain time (5:00pm) and get it to run a specific
function (updateTables).

Does anyone know how to do this.

Thanks a million,
Steven
 
A

Andy Cole

Steven

Use the Windows Scheduler to set up a task to run at your specified time.
If your 'updateTables' function is code (rather than a macro) you'll need to
create a macro that uses the RunCode option with your function as the code
parameter, and maybe add something to close the DB down afterwards.

Set the Run command in the Scheduler (all one line) to;

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" /wrkgrp "full path
and file name to workgroup file" "full path and file name of your DB" /user
ValidUserName /pwd ValidPassword /x NameOfMacroToBeRun

If you're not using MS Security this can be shortened to;

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "full path and file
name of your DB" /x NameOfMacroToBeRun

HTH

Andy
 

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