When Shelling to another database to bypass workgroup dialog box

J

John Baker

I have some code which opens another access database.
The code is: (which works fine)

Const q As String * 1 = """"
strUpdateTool = "C:\Program Files\Microsoft
Office2003\OFFICE11\MSACCESS.EXE " & q & strPath & q & " /wrkgrp " & q &
wrkgrpPathAndName & q & " /user Administrator /pwd aaa " & q
Shell strUpdateTool, vbNormalFocus


I am trying to avoid reentering the username and password when the new
database opens
The code seems to work fine and it selects the correct workgroup file but it
still displays the dialog box to enter the password. The password section is
blank.

Any ideas?

Any help greatly appreciated.
John B
 
A

Albert D.Kallal

Const q As String * 1 = """"
strUpdateTool = "C:\Program Files\Microsoft
Office2003\OFFICE11\MSACCESS.EXE " & q & strPath & q & " /wrkgrp " & q &
wrkgrpPathAndName & q & " /user Administrator /pwd aaa " & q
Shell strUpdateTool, vbNormalFocus

You need quotes around the user name, and the password...since they could
have spaces...

& " /user Administrator /pwd aaa " & q

needs to be

& " /user " & q & "Administrator" & q & " /pwd " & q & "aaa" & q
 
Top