Automatically activate Microsoft Access 2003

C

chonming

I am monitoring a database that required updates every morning of business
day. The update takes half an hour and it will saved lots of time if it can
be done before working hour. I would like know the way to automcatically
activate the Microsoft Access 2003 in my PC (24hrs On) during specific time.
After activating Microsoft Access, I would like it to open the specific
database and run the update automatically. It includes inserting a password
into the Microsoft Access in-built password feature.

Anyone who know the solution, please kindly reply this post. Thank you.
 
D

david epsom dot com dot au

In general, you should use ADO or DAO to update
a database, rather than activating Access.

You can script ADO or DAO using VBS, and you
can call VB Scripts from the windows task
scheduler.

Here is an example (air code)

dim db
dim dbe
set dbe = wscript.createobject("dao.dbengine.36")
set db = dbe.opendatabase("fred.mdb")

db.execute "delete * from tblCB_Cashbook where (strModuleId is null) ;", 512
or 128


(david)
 
C

chonming

Thanks David for your quick reply.

Right now I already get the update procedure done. I just want some
method/program to call that update function (inside a password-secured
Microsoft Access Database). Any Idea?

Cheer,
chonming
 
V

Van T. Dinh

Can you leave your computer on running Access (idling until a nominated
time)?

If yes, you can simply use the Form_Timer Event to check for the time and
start the process when the time is right.

Alternatively, you can use Windows Scheduled Task to open the database and
use the one of the events (Open / Load / Activate ...) to run your code.
You can even use AutoExec Macro or the /x command-line option to run any
Macro in the database.
 
G

Guest

You can use Shell to start Access using a password.
You can use GetObject to get the Access object you just
started.

It works ok if you only have one copy of Access running,
but in general, Access is not designed for un-attended
operation. You should try to shift to ADO/DAO if you
can.

(david)
 
Top