I want to disable specific fields in one row in Continuous Form in Ms Access using VBA when certain value of one field in the same row is selected. I used the below code but it applies on all rows.
Private Sub AttendanceType_AfterUpdate()
Me.[Enter Time].Enabled = True
Select Case Me.AttendanceType
Case "Annual Vacation", "Casual Leave", "Sick Leave"
Me.[Enter Time].Enabled = False
End Select
End If
End Sub
The above code works in Single Form view where we have only one row. However, in Continuous Form view, it disables the raw named "Enter Time" in all rows.
In this attached picture, see the first row. When attendance type is Sick Leave, it disables Enter Time fields in all Rows