Opening another database (Shell)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Back
Top