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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Positioning a form on the screen

Status
Not open for further replies.

JMCONNOR

Technical User
Feb 16, 2006
16
0
0
US
I'm using Access 97 and I have a simple database that I use to help me keep track of tasks I need to check on from time to time during the workday. To that end, the database opens three forms at once, each of which has a different use. It's really helpful to have all three open at once rather than having to switch among them via a menu or buttons on the forms themselves. Anyway, I position the two forms that occupy the topmost part of the screen by attaching the MoveSize command to their "Load" events. (The load event command for the Upper Left form is "DoCmd.MoveSize 0, 0")

The problem is that these two upper forms leave a space above them that I presume may be reserved for a toolbar. Because of this, they overlap the form at the lower portion of the screen. Is there any way to absolutely position the forms when they open? As it is, I always have to re-position the forms and if I subsequently have to open them in design mode, they reposition themselves again in a lower screen position.

Thanks
 
Have you tried using -1 or -2 or something as apposed to 0, to see if that fixes your issue? Because if it is automatically assuming the toolbar even if not there, then that might make up the toolbar difference - if it works, I've not tried it.
 
Supplying a negative value for horizontal position causes an "invalid value" error. But thanks for your effort anyway.
 
I suspect that you're correct about the space being reserved for menus! Played around with a couple of small forms I have and found that the secret to having DoCmd.MoveSize 0, 0 position the form as you want is to have the form's Popup Property set to YES. Places the form at the left/topmost portion of the screen.

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top