Setting | Description | Visual Basic |
Yes | (Default for all controls except unbound object frames) The control can have the focus. If the control is an unbound object frame, double-clicking it executes the control's primary verb. For example, an unbound object frame could play an embedded sound object. | True (–1) |
No | (Default for unbound object frames) The control can't have the focus and appears dimmed. If the control is an option group, neither the option group nor the controls inside the option group can have the focus. | False (0) |
Setting | Description | Visual Basic |
Yes | (Default for unbound object frames) The control functions normally but doesn't allow editing, adding, or deleting data. | True |
No | (Default for all controls except unbound object frames) The control functions normally and allows editing, adding, and deleting data. | False |
Enabled | Locked | Effect |
Yes | Yes | The control can have the focus. Data is displayed normally and can be copied but not edited. |
Yes | No | The control can have the focus. Data is displayed normally and can be copied and edited. |
No | Yes | The control can't have the focus. Data is displayed normally but can't be copied or edited. |
No | No | The control can't have the focus. Control and data are disabled (dimmed). |
Sub Form_Current()
If Me!EmployeeType = "Manager" Then
Me!SalaryDetails.Enabled = True
Me!PersonalInfo.Enabled = True
Me!PersonalInfo.Locked = False
Else
Me!SalaryDetails.Enabled = False
Me!PersonalInfo.Enabled = False
Me!PersonalInfo.Locked = True
End If
End Sub