juddymarch
Technical User
- Aug 10, 2007
- 17
Hi, I currently have a database (Which I didn't create) that contains a listbox of access database names and locations in which a user can select one and then click an open button to open that particular database. The file is opened by using the following code.
Dim varDatabaseLocation As String
If IsNull(Me.lstboxDatabases.Column(1)) Or (Me.lstboxDatabases.Column(1)) = "" Or IsNull(Me.lstboxDatabases.Column(2)) Or (Me.lstboxDatabases.Column(2)) = "" Then
MsgBox "The database does not exist or the link is not correct" & vbCrLf & vbCrLf & _
"Please contact the BMS Administrator for further information", , "File not available"
Exit Sub
End If
DoCmd.Hourglass True
varDatabaseLocation = Me.lstboxDatabases.Column(2) & Me.lstboxDatabases.Column(1)
Application.FollowHyperlink varDatabaseLocation ', , True
DoCmd.Hourglass False
Basically a path and mdb file name is passed into application.followhyperlink. The problem I have now is that one of the database's I need to open contains a different workgroup file with security. I need to pass in the workgroup file location name along with the password and username.
Im just wondering if this can be done? I have spent the last hour searching and haven't been able to find anything to help me.
Any advice help would be greatly appreciated.
Thanks
Justin
Dim varDatabaseLocation As String
If IsNull(Me.lstboxDatabases.Column(1)) Or (Me.lstboxDatabases.Column(1)) = "" Or IsNull(Me.lstboxDatabases.Column(2)) Or (Me.lstboxDatabases.Column(2)) = "" Then
MsgBox "The database does not exist or the link is not correct" & vbCrLf & vbCrLf & _
"Please contact the BMS Administrator for further information", , "File not available"
Exit Sub
End If
DoCmd.Hourglass True
varDatabaseLocation = Me.lstboxDatabases.Column(2) & Me.lstboxDatabases.Column(1)
Application.FollowHyperlink varDatabaseLocation ', , True
DoCmd.Hourglass False
Basically a path and mdb file name is passed into application.followhyperlink. The problem I have now is that one of the database's I need to open contains a different workgroup file with security. I need to pass in the workgroup file location name along with the password and username.
Im just wondering if this can be done? I have spent the last hour searching and haven't been able to find anything to help me.
Any advice help would be greatly appreciated.
Thanks
Justin