Opening another database (Shell)

S

Steve Price

Hi,

I'm using the code below to open another database:

Shell """C:\Program Files\Microsoft Office\Office\msaccess.exe"" " & _
"""\\ppnfsp02\midata\Public\Mortgage Callbacks\Specialist
Version\compacter.mdb"""

The database I'm opening requires a password. How can this be added to the
shell command?

Thanks
 
R

Roger Carlson

There is a command-line switch for passwords:
/pwd password

So it would be something like:
Shell """C:\Program Files\Microsoft Office\Office\msaccess.exe"" " & _
"""\\ppnfsp02\midata\Public\Mortgage Callbacks\Specialist
Version\compacter.mdb"" /pwd Blarg2"

(assuming Blarg2 is your password)

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

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