I have 2 databases. #1 is for user data entry and#2 is for maintenance. I want on closure of database #1 a macro to be run from database #2 and all databases to be closed. I figured out how to run the macro and close the database using this code:
Private Sub Command6_Click()
Call Shell("msaccess ""myDatabasePath.accdb"" /x Update Tables", 1)
DoCmd.Quit
End Sub
The problem I have is if I password protect database #2 it makes me manually enter the password. How can I bypass this or is there an easy fix around this?