When opening a form using DoCmd.OpenForm acDialog, you do not need the Modal
and Popup properties of that form to be set. I don't know if this is causing
the issue, but you may want to try it without them on.
Check the AutoResize property of the form as well... this should
automatically resize the form to whatever it's saved during design view.
If you really want to force the form to be a certain size, set each form
section Height property, and the form Width property in the Open event...
Me.Section("Header").Height = SomeNum
Me.Section("Detail").Height = SomeNum
Me.Section("Footer").Height = SomeNum
Me.Width = SomeNum
note that VBA uses Twips as it's unit... 1/20th of an imperial inch.
Therefore, 1inch = 1440 Twips
hth
--
Jack Leach
www.tristatemachine.com
"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
"accesswanabe" wrote:
> I have a form that I am trying to use as a modal dialog. I have the form's
> PopUp and Modal properties set to Yes. I open the form using vba with the
> following: DoCmd.OpenForm "frmInvoiceItemsforDaily", , , , , acDialog
>
> I also have the form's Border Style set to Sizeable. This is because I
> would like the dialog to be a certain size. When I save the form in form
> view after sizing it the way I want, the next time the code runs, the form
> displays as intended. The very next time the code runs, the form becomes
> tiny...no data or fields are visible. Not sure what to do about this problem.
>
> Anyone have any ideas?