Form Size Issue

  • Thread starter Thread starter Dial222
  • Start date Start date
D

Dial222

Hi folks,

I wnat to have a form display some date with a small button
which can be clicked to expand the visible area to display
previously hidden controls. Like a show/hide feature. I've
seen this done with VB but cannot quite figure it out with a
access forms.

Regards

Carl
 
Hi folks,

I wnat to have a form display some date with a small button
which can be clicked to expand the visible area to display
previously hidden controls. Like a show/hide feature. I've
seen this done with VB but cannot quite figure it out with a
access forms.

Regards

Carl

Figured it thus...

Private Sub toggleSize(fHide As Boolean)
If fHide Then
sfrmMenuControl.Height = 0
sfrmMenuControl.Visible = False
Section(acDetail).Height = 3250
Application.RunCommand acCmdSizeToFitForm
Else
sfrmMenuControl.Height = 3500
sfrmMenuControl.Visible = True
Section(acDetail).Height = 6750
Application.RunCommand acCmdSizeToFitForm
End If
End Sub

Private Sub cmdShowHide_Click()
If cmdShowHide.Caption = "&Hide" Then
toggleSize True
cmdShowHide.Caption = "&Show"
Else
toggleSize False
cmdShowHide.Caption = "&Hide"
End If
End Sub

Private Sub Form_Load()
toggleSize True
End Sub
 
Back
Top