This is what I have entered under 'on click' on my check box. I have right clicked it under 'design view' and clicked 'build event'. When I do so this is displayed in the code display....
Private Sub Noed_Click()
Dim fld As Control
If Me.Check1 = True Then
For Each fld In Me.Controls
If fld.ControlType <> acLabel And fld.Name <> "Noed" Then
fld.Enabled = False
If fld.ControlType <> acCommandButton Then fld.Locked = True
End If
Next
Else
For Each fld In Me.Controls
If fld.ControlType <> acLabel And fld.Name <> "Noed" Then
fld.Enabled = True
If fld.ControlType <> acCommandButton Then fld.Locked = False
End If
Next
End If
End Sub
When I use my form and then go to tick the box, this error comes up....
The expression on click you entered as the event property setting produced the following error: A problem occured while Tele Address - Business data was communicting with the OLE server or ActiveX control.
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]
* There may have been an error evaluating the function, event, or macro.
Private Sub Noed_Click()
Dim fld As Control
If Me.Check1 = True Then
For Each fld In Me.Controls
If fld.ControlType <> acLabel And fld.Name <> "Noed" Then
fld.Enabled = False
If fld.ControlType <> acCommandButton Then fld.Locked = True
End If
Next
Else
For Each fld In Me.Controls
If fld.ControlType <> acLabel And fld.Name <> "Noed" Then
fld.Enabled = True
If fld.ControlType <> acCommandButton Then fld.Locked = False
End If
Next
End If
End Sub
When I use my form and then go to tick the box, this error comes up....
The expression on click you entered as the event property setting produced the following error: A problem occured while Tele Address - Business data was communicting with the OLE server or ActiveX control.
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]
* There may have been an error evaluating the function, event, or macro.