Form Resizing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

I have a bit of a strange question and I hope you understand what I'm going
to try and explain (Access 2000):

I have a form that is maximized when it opens (in the OnLoad property) and
it fits perfectly in my database window. Now on this form, there is a
command button that allows the user to view a report of the details on the
form. The report (in print preview view) is also maximized.

When the user clicks the cmd button for the report, it opens on top of the
current form. This was done on purpose so that when the user closes the
report, the form stays open on the current record in which they were viewing
before they hit the cmd button for the report.

so far so good....

The problem I'm running into is when the report opens, Access appears to be
tiling the open windows. Then when the user closes the report, the form that
had the focus previously is not in the centre of the screen anymore. (it is
maximized, but shifted out of the centre of the database window and scroll
bars needed to be used to see the form....if that makes any sense)

I've tried putting docmd.maximize in pretty much all of the events in the
form (onCurrent...onGotFocus) but nothing seems to work. I tried to to
requery the form from the OnClose event of the report, and that seems to
work, but then it takes me back to the first record of the form.

So my long winded question is, is there any way that I can maximize this
form after the report closes? Or, do I have to requery the form when I close
the report and have a cmd.maximize line of code on the OnCurrent event of the
form and bookmark my position on the form?

Thanks for taking the time to look into this!!

Todd
 
Sorry to anyone who was trying to help on this post.

I just figured out my problem. I should have used the OnActivate Event.

Thank you!

TT
 
Back
Top