S
Steven
I have a database #1 where it's sole purpose is to open
another database #2. This is because this db #1 is an mde
so noone can see the code and it opens the other database
#2 by passing it a password and then closes itself #1. It
works fine but when the database #2 opens the screen does
not open the standard way. Normally if you open a
database that has a form to open on startup the form just
opens on a grey background. When I open using the mde #1
then database #2 opens from the application icon at the
bottom....then it moves an object that is about the size
of the icon to the center of the screen and then it
expands to the whole screen and then the form opens on
startup of database #2 as it should and #1 closes. In
summary, it has a lot more movement than normal. Here is
the code of the mde #1 that opens database #2. Is there
something that can be done here to make the screens open
in a more standard way?
Note: This is the mde #1 that opens the other db #2 named
New.mdb
Sub OpenPasswordProtectedDB()
Static acc As Access.Application
Dim db As DAO.Database
Dim strDbName As String
strDbName = "C:\Test\New.mdb"
Set acc = New Access.Application
acc.Visible = True
acc.RunCommand acCmdAppMaximize
Set db = acc.DBEngine.OpenDatabase(strDbName, False,
False, ";PWD=NewPW")
acc.OpenCurrentDatabase strDbName
db.Close
Set db = Nothing
DoCmd.Quit acQuitSaveAll
End Sub
Thank you for your help.
Steven
another database #2. This is because this db #1 is an mde
so noone can see the code and it opens the other database
#2 by passing it a password and then closes itself #1. It
works fine but when the database #2 opens the screen does
not open the standard way. Normally if you open a
database that has a form to open on startup the form just
opens on a grey background. When I open using the mde #1
then database #2 opens from the application icon at the
bottom....then it moves an object that is about the size
of the icon to the center of the screen and then it
expands to the whole screen and then the form opens on
startup of database #2 as it should and #1 closes. In
summary, it has a lot more movement than normal. Here is
the code of the mde #1 that opens database #2. Is there
something that can be done here to make the screens open
in a more standard way?
Note: This is the mde #1 that opens the other db #2 named
New.mdb
Sub OpenPasswordProtectedDB()
Static acc As Access.Application
Dim db As DAO.Database
Dim strDbName As String
strDbName = "C:\Test\New.mdb"
Set acc = New Access.Application
acc.Visible = True
acc.RunCommand acCmdAppMaximize
Set db = acc.DBEngine.OpenDatabase(strDbName, False,
False, ";PWD=NewPW")
acc.OpenCurrentDatabase strDbName
db.Close
Set db = Nothing
DoCmd.Quit acQuitSaveAll
End Sub
Thank you for your help.
Steven