M
micfly
Is there a way to hide a control when a form opens? The form is a subform
that opens with an on click event.
The control I want to hide is a command button cmdSearch on form
FrmTracking. Here's the code I have so far with the exclusion, of course to
hide the control:
Private Sub cmdOpenTracking_Click()
' Opens the form FrmTracking in the Subform control, the name of the subform
is SbFrmCtl
Me.SbFrmCtl.SourceObject = "FrmTracking"
' Same as setting DataEntry to Yes in the forms property/data tab
Me.SbFrmCtl.Form.DataEntry = True
' Set the focus to the first txtbox on the subform
Me.SbFrmCtl.SetFocus
Me.SbFrmCtl.Form.NavigationButtons = False
End Sub
Thanks again for any help!
that opens with an on click event.
The control I want to hide is a command button cmdSearch on form
FrmTracking. Here's the code I have so far with the exclusion, of course to
hide the control:
Private Sub cmdOpenTracking_Click()
' Opens the form FrmTracking in the Subform control, the name of the subform
is SbFrmCtl
Me.SbFrmCtl.SourceObject = "FrmTracking"
' Same as setting DataEntry to Yes in the forms property/data tab
Me.SbFrmCtl.Form.DataEntry = True
' Set the focus to the first txtbox on the subform
Me.SbFrmCtl.SetFocus
Me.SbFrmCtl.Form.NavigationButtons = False
End Sub
Thanks again for any help!