Link to home
Start Free TrialLog in
Avatar of wshepard
wshepard

asked on

Open Access Database Using VBS

How do you open an Access database using vbs and specify a workgroup mdw file, username and password?
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image


Specify a Workgroup:
"C:\Program Files\Microsoft Office\Office10\msaccess.exe" "\\abc\workgroup\xyz\SomeDatabase.mdb" /wrkgrp
What are you trying to do? if you just want to connect to it, you can open an ADO or DAO connection.
Avatar of wshepard
wshepard

ASKER

LSM,

I want to fully open the database from a vbs script. The db is secured so I want to pass the users username and password to Access from the script.
The current desktop shortcut to the database uses the following for the target path:
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /wrkgrp \\cotserver\vol1\departments\fire\databases\cityfire.mdw "\\cotserver\vol1\departments\fire\databases\cityfire personnel.mdb"

The Start in box contains the following:
\\cotserver\vol1\departments\fire\databases
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you