Docmd.Maximize ignored by User's

ver.  Access 97

I am having a problem with Docmd.Maximize

When I try to make Access increase any form up to maximum size it works fine for me if I log on to any computer, but when users log on the Docmd.Maximize is ignored UNLESS it is the first line of code in the OnOpen Event.

Also the forms do not carry the Maximized nature from form to form as is documented in all the Access books I have so I have to keep sending the Docmd.Maximize action.

Is this some kind of permission problem?  As I said, It works fine for me no matter what computer I log onto.

How can I restore this Action to its documented nature?

-Uncle Samedi
UncleSamediAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

paaskyCommented:
Hello UncleSamedi,

How does the login differens between you and the user?

How are you opening the forms (Dialogs won't resize)?

You don't hide Maximize or Minimize buttons from users?

Have you tried what happens if to place DoCmd.Maximize to OnLoad or OnActivate events?

Regards,
Paasky





0
UncleSamediAuthor Commented:
re: difference

  I have admin security, they all have different security groups.

re: how are they opening

  The Forms are opened by OnClick or OnClose Events from other Forms.

re: Hidden Min / Max buttons

   They are not hidden.  I'd like to hide them but then the Users would have to use the forms at their restore size.

re: OnLoad, OnActivate, OnCurrent

  The Action seems to work fine everywhere else, just not in the OnOpen Event unless it occurs before anything else.

  I can work around the problem, I'm just trying to find out why the Action is being ignored.
0
brewdogCommented:
what else are you doing in the OnOpen event? I almost always use the Load event myself . . . could it be that the form(s) you are opening have permissions that would prevent the users from maximizing a form?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

UncleSamediAuthor Commented:
brewdog,

  The only commonality is the use of a docmd.close Action to close the form which caused the current form to open.

  Could it be that the use of Docmd.Close used to close ANY form prevents the use of Docmd.Maximize ?

  re: permissions

  Users have only Open/Run permissions for all Forms (It's gotta stay that way).

  Is it possible that the combination of Docmd.Close and Open/Run permissions caused Access to hiccup over Docmd.Maximize.

  I recall reading somewhere in a VB book that Docmd.Close causes the current code to stop.  This is obviously not the case with Access, but since Docmd runs an Action could this be a left over from days gone by?

-Uncle Samedi
0
brewdogCommented:
So your code from frmOne's command button works like this:

DoCmd.OpenForm "frmTwo"
DoCmd.Close acForm, me

and your Open event for frmTwo says:

DoCmd.Maximize

Is that right? Hmm . . . Does the Open event fire before the DoCmd.Close event, if you step through? I know the Load event does (that's what I typically use), but I'm not sure about the Open.
0
brewdogCommented:
any news here, UncleSamedi?
0
UncleSamediAuthor Commented:
Adjusted points to 50
0
UncleSamediAuthor Commented:
Sorry for the delay,

Your understanding of the setup is perfect.

Open Event fires before the Close event (I've checked).

The Docmd.Maximize works exactly the same in the OnLoad event for me, ie. if it is not the first line of code it will not expand the form.

Do you have the Docmd.Maximize working where it is not the first line of code?

I have found an instance where there is no Docmd.Close preceeding the Docmd.Maximize, but there is a Docmd.SelectObject and a Docmd.RunCommand (Just FYI).  Also, I have found instances where the Docmd.Maximize will not work for me (Admin) either.

-Uncle Samedi
0
brewdogCommented:
Hmm . . . like I said, I always use form_load and it works fine for me. Of course, I may always put the maximize first. I don't do that consciously, but logically it makes sense to me. Is there a problem for you in putting the DoCmd.Maximize first in each form's Open/Load event? or are you just wondering why it works this way?
0
UncleSamediAuthor Commented:
The reason I need to use it later in the code is because I have a couple of forms which do calculations in the OnCurrent Event.  If I put the Maximize at the top of the code of the OnOpen event the form opens and the user has to wait for a potentially large length of time while the OnCurrent event runs calculations for each record and then repaints the screen for each (say in a continuous form with 2000 records).  If I put the Maximize command later in the coding of the OnOpen or OnLoad event the calculations are done without a screen update for each one (which takes far less time) and the form repaints once when it maximizes.

I know I can work around the problem with flags and/or by using QueryDef objects.  I am wondering if anyone knows why the maximize command will not function in certain places at certain times, especially since it is documented to work differently than it actually works.

-Uncle Samedi
0
brewdogCommented:
what about the possibility of doing the calculations in form_load and then maximize in Open? Does that work?

As for why it works different from its documentation . . . that seems to be a common feature of most software, not just Microsoft. :o)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
UncleSamediAuthor Commented:
I guess this is the only solution.  The combination does work.  

thanks for the help.

-Uncle Samedi
0
brewdogCommented:
sorry I couldn't give the answer we'd both like to see. :o) I have come to realize that programming isn't so much correct knowledge as it is figuring out workarounds.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.