opencurrentdatabase does not open mazimized

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?
 
T

TC

untested:

dim db as database
set db = dbengine.opendatabase (...)
db.docmd.maximize

HTH,
TC
 
D

Dirk Goldgar

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
 
G

Guest

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)


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top