Open a secure database from command line

harrisw

Registered User.
Local time
Today, 21:55
Joined
Mar 27, 2001
Messages
131
I have an access 97 database that requires userid and password to enable a user to log in.

I need to be able to run either a .bat file or command line that will open the database with the correct userid and password and then run a specific macro.

Anyone help.?
 
Here is the command that goes in the target field of a custom shortcut...

"C:\Program Files\Microsoft Office\Office\msaccess.exe" /runtime /wrkgrp "C:\My Documents\Databases\TestWorkgroupFile.mdw" "C:\My Documents\Databases\TestDBfile.mdb" /user TestUser /pwd secret

Using the above as is (changing it to your details of course ;-) in your batch file will open your secured db.

In Windows XP, the DOS window does not close until the db is closed but I am sure you can fix that with some code in the batch file.

HTH
 
that works great thanks v much
 

Users who are viewing this thread

Back
Top Bottom