Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / May 2007

Tip: Looking for answers? Try searching our database.

Cannot maximize second database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NevilleT - 21 May 2007 10:23 GMT
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
BeWyched - 21 May 2007 14:30 GMT
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
DAVID - 22 May 2007 06:39 GMT
>     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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.