Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Access2000 macro. Database has Password

Status
Not open for further replies.

TURNERMICH

Technical User
Apr 5, 2000
64
AU
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top