form window mode dialog opens differently

antonyx

Arsenal Supporter
Local time
Today, 14:36
Joined
Jan 7, 2005
Messages
556
hi im opening my form like so..

Code:
DoCmd.OpenForm "frm3AddPerson", windowmode:=acDialog

on that frm3AddPerson i use

Code:
Private Sub Form_Open(Cancel As Integer)
DoCmd.MoveSize 0, 0, 14000, 8000
End Sub

problem is when i open the form in dialog mode.. it opens the form more to the left and top then normal opened forms..

anyone know a method that ensures form size.. and x y position that works always even in dialog mode..
 
set the size in design view and set it to autoresize and autocenter. Remove your docmd and let it do it all for you, so it will work consistantly.

John M Reynolds
 
Also, you have:
DoCmd.MoveSize 0, 0, 14000, 8000

Which is trying to SIZE a dialog, not move it. To MOVE it you need

DoCmd.MoveSize 14000, 8000

The arguments go in this order
, [Down], [Width], [Height]​
 

Users who are viewing this thread

Back
Top Bottom