Results 1 to 4 of 4
  1. #1
    Join Date
    May 2010
    Posts
    67

    Unanswered: Movesize method not working

    Hello,

    I am trying to alter the size of a form. In the Load event I have the following code, but nothing happens, the form opens to it usual size:

    DoCmd.MoveSize , , 1440 * 8, 1440 * 6

    Am I missing something. Could there be a property set, that disables the movesize method. Please note, that I have set the forms in the application to overlapping windows.

    Thanking you in advance for your help!

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    I'm not sure that the Load event is the right place for resizing and moving a form. When this event occurs the form is not "completed" yet, and an intrinsic Resize event occurs after the Load event. The sequence of events when you open a form is:
    Open → Load → Resize → Activate → Current.

    Moreover, why do you bother using the DoCmd.MoveSize method while you could use:
    Code:
    Me.Move Width:=1440 * 8, Height:=1440 * 6
    Which is at least standard in its arguments (oddly, MoveSize uses arguments for Right and Bottom coordinates, while all standard coordinates in Windows are Left-Top based).
    Have a nice day!

  3. #3
    Join Date
    May 2010
    Posts
    67
    Thanks so much Sinndho! I moved the code to the RESIZE event and it is working perfectly.

    Have a GREAT DAY!

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •