movesize syntax

  • Thread starter Thread starter Dave50
  • Start date Start date
D

Dave50

Guest
I can move the form using the form property "auto resize" and design view but I would like to do this with code.

At present - opening a form using:

DoCmd.OpenForm stDocName, , , , acFormAdd, acDialog, strCopy

and the on load event of stDocName then has the sub:

DoCmd.MoveSize 10,10, ,

which gives a compile error - syntax error when form opens. Any ideas?
 
Yes, you have two parameters missing, the width and height.
e.g. DoCmd.MoveSize 10,10,1000,1000

David
 
That last statement is actually incorrect. The width and height are optional and thus the original:
DoCmd.MoveSize 10,10, ,
Is actually close. You only leave comma's in when there is more information after.
Correct way: DoCmd.MoveSize 10,10

Peace
 

Users who are viewing this thread

Back
Top Bottom