irrational minimize, restore,maximize behavior-how to control

P

Phil Smith

OK. Here is an example of the problem I am having.
I open a form via an autoexec macro. This is a switchboard, which leads
to other switchboards, which in turn open up reports in preview mode, or
queries in Datasheet mode.

When the databse is opened, the Main switchboard form is maximized,
taking up all of my available Access real estate. I like it like that.
Hit the button to open up my Inventory switchboard form and it opens
up on top of the Main form, also maximized. All kewl. Hit a button
which calls an open query, and that query opens up maximized. Major
Kewlness! Colonel Kewlness even!
Then I hit the little "X" for that query, to go back to the Inventory
switchboard, and both switchboard forms are "restored down", rather than
maximized, I can not see all of the buttons on that form as they are
beyond the limits of the now reduced size form, including the control
buttons which would allow me to maximize it or close it. At this point,
the only thing I can do is CTRL-f4, MAx my main switchboard, and open
the Inventory Switchboard again.

NOT kewl. I am sure I could add a whole bunch of events like On click,
on Got Focus, O Dancer, On Prancer, ON CNN etc., to all of my
switchBoard forms, but there's gotta be a better way...

Also, with that MainForm open, I cannot access the main database screen
to look at a query, design a new report, etc. Not a big deal, and
perfectly acceptable behavior under these circumstances, but is this
behavior changeable?

Tanky tanky

Phil
 
J

Jerry Whittle

Make your code that opens the query look something like this:
Dim stDocName As String

stDocName = "Keensie_Crosstab"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.Maximize

The DoCmd.Maximize is the trick.

As far as the database window, try pressing the F11 key. Unless someone
locked up the database window, the F11 key should bring it to the forefront.
 
P

Phil Smith

OK. Two things. You realize that it IS opening up the query already
maximized? It is certainly easy enough to add that command, and I will
try it...
As far as hitting F11: I will try that. Do you know why this is
happening though? There is nothing in the code that opens it up that
would be responsible, and it is being opened in "normal" window mode.
Is this some special feature being activated because it is being opened
from AutoExec?

Thanx
 

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