new_guy_tom
Registered User.
- Local time
- Today, 14:20
- Joined
- May 14, 2010
- Messages
- 13
Hi, I am trying to open a database with a password (I know the password) from another database however I cannot work out how to do it. I have been using this code to do this to open databases without passwords for a while.
I am using Access 2007.
Any help on how to do this would be great! Thanks.
I am using Access 2007.
Any help on how to do this would be great! Thanks.
Code:
Private Sub Command36_Click()
Const cstrClientFEPath = "G:\Templates\"
Const cstrFEFile = "db.accdb"
Dim intX As Integer 'Utility var
Dim strCommandLine As String 'Application to run and file to open
Dim strMSAccessAPP As String 'Folder path of Access Executable
strMSAccessAPP = SysCmd(acSysCmdAccessDir) & "MSAccess.exe"
'Build string
strCommandLine = strMSAccessAPP & " " & Chr(34) & cstrClientFEPath & cstrFEFile & Chr(34)
intX = Shell(strCommandLine, 3)
End Sub