Screen Position of Pop Up Form

  • Thread starter Thread starter DD
  • Start date Start date
D

DD

I have a main form that runs maximized and it contains
several command buttons that open subforms. If a user
clicks on command button 1 the subform opens and then he
clicks on button 2 another subform opens. Is there a way
to assure that the windows that open, open in the exact
same screen position? My form consists of several of these
command buttons that open subforms but each form seems to
open not in the exact same screen position. For instance,
one will open closer to the left or top of the screen than
the next. Thanks in advance.
 
I have a main form that runs maximized and it contains
several command buttons that open subforms. If a user
clicks on command button 1 the subform opens and then he
clicks on button 2 another subform opens. Is there a way
to assure that the windows that open, open in the exact
same screen position? My form consists of several of these
command buttons that open subforms but each form seems to
open not in the exact same screen position. For instance,
one will open closer to the left or top of the screen than
the next. Thanks in advance.

You can specify the position a form should open in by using the
DoCmd.MoveSize method in the form's Load event:

DoCmd.MoveSize 2*1440, 1.5*1440

The form will open 2 inches from the left edge of the screen and 1-1/2
inches down from the top. All measurements are in Twips (1440 per
inch).
 
Back
Top