Link to home
Start Free TrialLog in
Avatar of tbsgadi
tbsgadiFlag for Israel

asked on

Resize a form opened with acDialog

Hi Experts,

This sounds simple but how's it done?
How do I resize a form opened in code with
DoCmd.OpenForm "Formname", , , , , acDialog

I have a formFooter that's invisible.
Iwant to press a button on the form & make the footer visible + resize.

I have to use acDialog.




ASKER CERTIFIED SOLUTION
Avatar of rvooijs
rvooijs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi tbsgadi,

Create a new button on the form and add some code like this:

Private Sub Command0_Click()
    On Error Resume Next
    Me.FormFooter.Visible = True
    RunCommand acCmdSizeToFitForm
End Sub

Alan :)
Avatar of tbsgadi

ASKER

Thanks ..all I needed was the
  DoCmd.RunCommand acCmdSizeToFitForm

Sorry Alan Robert said it first!
Thats OK, glad you got it working!

How about making it a toggle button

    On Error Resume Next
    ' toggle show/hide footer
    Me.FormFooter.Visible = Not Me.FormFooter.Visible
    RunCommand acCmdSizeToFitForm

Alan :)
Avatar of tbsgadi

ASKER

Thanks for you suggestion Alan,but it's only one way.
I press the button after Stage one & move to Stage 2