opencurrentdatabase does not open mazimized

  • Thread starter Thread starter Tim Reid
  • Start date Start date
T

Tim Reid

I am using the opencurrentdatabse method to open a
database, but depending on resolution it is opening less
than maximized. Can this be controlled?
 
Tim Reid said:
I am using the opencurrentdatabse method to open a
database, but depending on resolution it is opening less
than maximized. Can this be controlled?

I'm not sure what you're doing; I assume you're working with an object
variable referring to an instance of Access that you've created. What
is it you want to maximize, the database window or the Access
application? I'm guessing the latter. You might try this:

Dim objAccess As Access.Application

' ... code that sets objAccess to an instance of Access ...

objAccess.OpenCurrentDatabase "C:\MyPath\MyDB.mdb"

objAccess.RunCommand acCmdAppMaximize
 
Thank you, that is exactly what I needed.
-----Original Message-----


I'm not sure what you're doing; I assume you're working with an object
variable referring to an instance of Access that you've created. What
is it you want to maximize, the database window or the Access
application? I'm guessing the latter. You might try this:

Dim objAccess As Access.Application

' ... code that sets objAccess to an instance of Access ...

objAccess.OpenCurrentDatabase "C:\MyPath\MyDB.mdb"

objAccess.RunCommand acCmdAppMaximize


--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
 
Back
Top