I am opening a second Access database from within an Access database. The
problem I have is that I cannot get the second database to maximize. It
opens at postage stamp size. The code I am using is
Set appAccess = New Access.Application
appAccess.Visible = True
appAccess.OpenCurrentDatabase strDBName
appAccess.DoCmd.Maximize
appAccess.DoCmd.OpenForm strFormName
Hi NevilleT
Delete the last line of your coding and, instead, add the strFormName form
to the application's StartUp page - Tools > StartUp > Display Form.
That should sort it - I don't know why but it should! I had the same problem
which manifested itself when the specified form was a pop-up/modal.
Cheers.
BW
> I am opening a second Access database from within an Access database. The
> problem I have is that I cannot get the second database to maximize. It
[quoted text clipped - 5 lines]
> appAccess.DoCmd.Maximize
> appAccess.DoCmd.OpenForm strFormName
NevilleT - 22 May 2007 00:33 GMT
Thanks for the tip. For some reason it is now displaying at about half
screen size. I will try your tip however and see if it helps.
Thanks
Neville
> Hi NevilleT
>
[quoted text clipped - 17 lines]
> > appAccess.DoCmd.Maximize
> > appAccess.DoCmd.OpenForm strFormName
> appAccess.DoCmd.Maximize
As it happens, that command doesn't maximise
Access -- it maximises the form open inside
Access.
What you want is
DoCmd.RunCommand acCmdAppMaximize
Since you don't have a form open inside Access,
perhaps that version of Access and that version
of Windows has decided that you don't need a
very large window?
(david)
> I am opening a second Access database from within an Access database. The
> problem I have is that I cannot get the second database to maximize. It
[quoted text clipped - 5 lines]
> appAccess.DoCmd.Maximize
> appAccess.DoCmd.OpenForm strFormName
NevilleT - 22 May 2007 10:06 GMT
Hi David
That did not work but I understand the theory. I finally solved it by
creating an autoexec macro to maximize the application. Another odd thing is
that if I don't open the form from the first database, the second opens then
immediatly closes. No problem to open it from the calling database but am
curious as to why the second one opens then closes.
Thanks for your help David
> > appAccess.DoCmd.Maximize
>
[quoted text clipped - 21 lines]
> > appAccess.DoCmd.Maximize
> > appAccess.DoCmd.OpenForm strFormName
DAVID - 24 May 2007 02:14 GMT
Don't know what exactly is going on, (maybe
it's a security setting? or a problem on your
PC?) but it is possible to open either in
a user mode (stay open until you shut it) or
in a system mode (close when appAccess goes out
of scope). When you open like that you normally
have to either have a global appAccess object,
or do something to switch the application into
user mode.
(david)
> Hi David
> That did not work but I understand the theory. I finally solved it by
[quoted text clipped - 30 lines]
>>> appAccess.DoCmd.Maximize
>>> appAccess.DoCmd.OpenForm strFormName