TURNERMICH
Technical User
The Access Database has a security password admin
The following works fine., but asks for a password eg admin
There does not seem to be a password option on the db_app.OpenCurrentDatabase strDBName line.
???How do i run this without having to manually enter the password all the time
Appreciate any help
-------------------------
Private Sub Command2_Click()
RunAccessMacro "c:\aaaaa\bbbbb.mdb", "macro1"
End Sub
Public Sub RunAccessMacro(strDBName As String, strMacroName As String)
Dim db_app As access.Application
Set db_app = New access.Application
db_app.OpenCurrentDatabase strDBName
db_app.DoCmd.RunMacro strMacroName
db_app.Quit
Set db_app = Nothing
End Sub
The following works fine., but asks for a password eg admin
There does not seem to be a password option on the db_app.OpenCurrentDatabase strDBName line.
???How do i run this without having to manually enter the password all the time
Appreciate any help
-------------------------
Private Sub Command2_Click()
RunAccessMacro "c:\aaaaa\bbbbb.mdb", "macro1"
End Sub
Public Sub RunAccessMacro(strDBName As String, strMacroName As String)
Dim db_app As access.Application
Set db_app = New access.Application
db_app.OpenCurrentDatabase strDBName
db_app.DoCmd.RunMacro strMacroName
db_app.Quit
Set db_app = Nothing
End Sub