Enable/Disable Control on Form Open

K

Kirk P.

I have a form called frmGroups. When I open this form in "add" mode, I would
like to disable the cboFindGrp control. When I open this form in "edit"
mode, I would like this control to be enabled.

How do I do this?
 
A

Allen Browne

When you OpenForm add mode, its DataEntry property is True.

Private Sub Form_Open(Cancel As Integer)
Me.frmGroups.Enabled = Not Me.DataEntry
End Sub
 
Top