Can't open secondary db to full screen

cybhunter

Registered User.
Local time
Today, 14:37
Joined
Sep 11, 2007
Messages
17
RESOLVED: Can't open secondary db to full screen

I am opening a secondary db from my main db using the following code:

Dim accapp As Access.Application
Set accapp = New Access.Application
accapp.OpenCurrentDatabase ("C:\GEM\Gem Backups\OptimumDesign\OptimumDesign.mdb")
accapp.Visible = True
DoCmd.Maximize

My problem is I cannot get the secondary db to open full screen. Can anyone help? Thanks in advance!
 
Last edited:
This works for me:
accapp.DoCmd.Maximize
 
I agree, thats what i use on the opening form of the Db

edit
But it only maximises the form to the size of the access applications window thats opened, I'm on a pc thats has'nt got a copy of access at the moment but there is code that will maximise the access application to go full screen (I'm on my games pc at moment, playing Runescape, therefore can't check for the code you need). From memory though fellow member Ghudson posted the code to make the Access application maximise to full screen, try searching for it under his name.
edit end
 
Last edited:
That's not working for me..... the db opens but only 3/4 of the screen. :(
 
I'm not opening a form...I am opening a second db. I want it to open in full screen. Like the primary db does. I have to manually hit the maximize button to get it to open full.
 
I just realized something......the app is opening maximized it is the second session of access that is not. Any ideas?
 
Try putting docmd.maximise in the events 'On Current or On Active' of the form your opening via the Db.
 
If you just want to open the DB then try using a batch file. In my experience the batch file is the most reliable. Run the batch file with either Shell or RunApp in a macro.
 
I know what your saying Mike, but i've never had a problem opening up another database from the one I'm calling from. Its possible and reliable, can't post any code that will help until Monday, I'm going away for the weekend.
 
I have the same problem with code opening Word in Vista. I have tried everything, I posted a couple of times and nearly wore out Google:D but I finished with it minimised. A batch file, no problem. Of course I have to use the code because of what I am doing with Word.
 
Allan57: Looking forward to seeing that code. I can open the secondary database no problem. The problem is that the second session of access is not opening maximized. Thanks!
 
Place this code in The form load event, on the opening form of the second database.

DoCmd.Maximize

DoCmd.RunCommand acCmdAppMaximize

This will give you a maximise application and form
 
Last edited:
Or

Dim accapp As Access.Application
Set accapp = New Access.Application
accapp.OpenCurrentDatabase ("C:\GEM\Gem Backups\OptimumDesign\OptimumDesign.mdb")
accapp.Visible = True
accapp.RunCommand acCmdAppMaximize

DoCmd.Maximize
 

Users who are viewing this thread

Back
Top Bottom