VB script to run an msaccess macro

isihalin

New member
Local time
Today, 10:45
Joined
Mar 16, 2009
Messages
6
HI

I have MS access 2000 database which is password protected. I have scheduled a VB script to run the macro evry 5 hr in a day, Since it is password protected, every time when i run the script it is asking me the password to enter, how can i mange them in VB script itself.

Here is my code:

with createobject("access.application")
.opencurrentdatabase("C:\Program Files\Zicom Universal Software\UNIVERSAL.mdb")
.docmd.runmacro("mum4d")
.closecurrentdatabase
.quit
d="D:\diwakar\schedule\Testlog.txt"
with createobject("scripting.filesystemobject").opentextfile(d,8,true)
.writeline time & ", " & date
.close
end with
end with


Any help,

Thanks in advance,

Diwakar
 

Users who are viewing this thread

Back
Top Bottom