I am using the following code to open a password protected database. I know the code is working, because if I misspell the database or form name I get an error that the database or form is missing or doesn't exist, but I can't see the access window or the form. Please help.
Option Compare Database
Dim appAccess As Access.Application
Sub OpenTest()
Const strConPathToDB = "P:\test.mdb"
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "P:\test.mdb", , "test"
appAccess.DoCmd.OpenForm "Main Menu"
End Sub
Option Compare Database
Dim appAccess As Access.Application
Sub OpenTest()
Const strConPathToDB = "P:\test.mdb"
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "P:\test.mdb", , "test"
appAccess.DoCmd.OpenForm "Main Menu"
End Sub