Question : How do I maximize an external database window using VBA code in another Access Database?

Hi experts,

I asked a question yesterday relating to opening an external MS Access database from inside another MS Access database.  The code works in the fact that it opens up the external database, but it is not maximizing the external database window.  Instead, it is opening up the MS Access database window a third of the size if it were maximized.

The attach the code that has been used, and includes a Maximize line of code, which I thought was working, but is not.

Any help would be appreciated.

Regards
Terry
1:
2:
3:
4:
5:
6:
'Code below opens the external database
Set acObj = CreateObject("Access.application")
    acObj.OpenCurrentDatabase CurrentProject.Path & "\DatabaseB.mdb"
    acObj.Visible = True
    acObj.UserControl = True
    acObj.DoCmd.Maximize

Answer : How do I maximize an external database window using VBA code in another Access Database?

Maximize just maximizes the current object, not the entire window. You can try this:

accObj.DoCmd.RunCommand acCmdAppMaximize


Random Solutions  
 
programming4us programming4us