B
BrunoKP
The procedure below works fine with password when connecting to the backend
placed in a local drive, but when connecting to a remote backend I get the
message "Password is not valid". I have asked about it before, but at that
time I had not yet tried the remote drive.
It also works with the excact below code, i.e. connecting to the remote
drive if I remove the password in the Backend.
The code below is placed in a hidden form, which is opened by an Autoexec
macro.
The error message is generated when calling the DoCmd.OpenForm "frmLogin".
I have no starting form.
Private Sub Form_Load()
Dim ServerFile As String
Dim db As DAO.Database
Dim ws As DAO.Workspace
Set ws = DBEngine.Workspaces(0)
ServerFile = "\\MyRemoteDriveName\Mypath\Appname_be.accdb"
' ServerFile = "d:\Mypath\Appname_be.accdb"
Set db = ws.OpenDatabase(ServerFile, False, False, "MS Access;pwd=******")
DoCmd.OpenForm "frmLogin"
End Sub
placed in a local drive, but when connecting to a remote backend I get the
message "Password is not valid". I have asked about it before, but at that
time I had not yet tried the remote drive.
It also works with the excact below code, i.e. connecting to the remote
drive if I remove the password in the Backend.
The code below is placed in a hidden form, which is opened by an Autoexec
macro.
The error message is generated when calling the DoCmd.OpenForm "frmLogin".
I have no starting form.
Private Sub Form_Load()
Dim ServerFile As String
Dim db As DAO.Database
Dim ws As DAO.Workspace
Set ws = DBEngine.Workspaces(0)
ServerFile = "\\MyRemoteDriveName\Mypath\Appname_be.accdb"
' ServerFile = "d:\Mypath\Appname_be.accdb"
Set db = ws.OpenDatabase(ServerFile, False, False, "MS Access;pwd=******")
DoCmd.OpenForm "frmLogin"
End Sub