title: Disable specific fields in a row in Continuous form in Microsoft Access using VBA
body: <p>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. </p>
  
  <pre><code>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
  </code></pre>
  
  <p>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.</p>
  
  <p>In this attached picture, see the first row. When attendance type is Sick Leave, it disables Enter Time fields in all Rows</p>
  
  <p><a href="https://i.stack.imgur.com/GZUyb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GZUyb.png" alt="enter image description here"></a></p>