Howdy Dev and Eric,
1) With Access 97 you can use AccObj.RunCommand acCmdAppMaximize,
although ShowWindow has its charms, especially if you want to hide the
instance. (Dev - I've had problems using Access from Access when I need to
switch to the new instance and open an object. For some reason, Access 97
seems to issue Restore after I maximize and activate with ShowWindow. If I
activate the app with ShowWindow and then use Runcommand to maximize it, I
get the desired result. Can you confirm this behavior?)
2) If you are creating your second instance of Access as New
Access.Application instead of shelling the Access and grabbing the instance
with GetObject (which isn't very easy), when you quit the creating App the
referencing process is lost and the second instance tries to go away because
it loses scope. If you want the instance to go away nicely, you'll need to
explictly close the open database and issue the Quit method. My experience
with this is that if you don't, the automation server will minimize and
linger just about every time, even if you aren't causing one of the bugs
described on Dev's web site.
Thanks,
Doug
Quote:
> Hi Eric,
> (1) Yup... I use the ShowWindow instead.
> (2) No such problems here, but it sounds like one of the bugs. Check this
> link for details.
> < http://home.att.net/~dashish/bugs/bugs0005.htm >
> HTH
> --
> Dev Ashish (Just my $.001)
> ---------------
> The Access Web ( http://home.att.net/~dashish )
> ---------------
> : I'm trying to use automation to do a number of things (opening another
> : database from within a current database, compacting etc...) and I'm
> getting
> : close, but I am running into some problems:
> :
> : 1) I can't find an action or method to maximize Access. The
> : closest I've found is AccObj.DoCmd.Maximize... Any thoughts?
> :
> : 2) The second, is when I open an instance of a second access
> : database app, and try to close the first instance, the second instance
> gets
> : very flightly, that is as soon as I click on it, it minumizes and is
> : unworkable....
> :
> :
> : thanks
> :
> :