movesize syntax (1 Viewer)

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?
 
D

DJN

Guest
Yes, you have two parameters missing, the width and height.
e.g. DoCmd.MoveSize 10,10,1000,1000

David
 

Drevlin

Data Demon
Local time
Today, 10:43
Joined
Jul 16, 2002
Messages
135
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

Top Bottom