Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form moves all by itself

Status
Not open for further replies.

KMKelly

Programmer
Jan 23, 2002
35
0
0
US
I have a form with a lot of information and I wanted it as big on the screen as possible, but if you maximize it in the window it shows the min, max, close buttons even if they are disabled on the form. I got some code from Microsoft that sizes the form on open to the size of the access window and moves it in the upper left corner. It works great.

Except.... when I open a report from the form and then close that report, the form moves down on the screen about 1.5 inches and I can't see the bottom. I have to drag it up. This happens whether I leave it open and visible OR open and not visible. I don't want to close it, because they will be printing the report and continuing to work in the form.

It has to do with maximizing the report, which I do when it opens (or the user could do, no way to turn it off, not that I want to). If I open the report and don't maximize it, the form doesnt't move. If I maximize the report and size back down before closing, the form doesn't move. If the report is maximized when I close it, the form does move.

I have tried putting a DoCmd.Restore in the close and deactivate events of the report, but it doesn't work. I also tried to rerun the code that originally placed the form both in the close report event and in various form events like OnActivate, OnCurrent etc... I know it is a long shot, but does anyone have any ideas?

Thanks.

Kristin
 
I'd try again the Activate event...but you say you have already done that. Are you sure the Activate event is actually linked to the form (check form's properties and see if there is an [Event Procedure] in the OnActivate line)?

It is a long shot indeed...



[pipe]
Daniel Vlas
Systems Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top