title: Ms Access lock a field based on its current value in continuous (tabular) form
body: <p><img src="https://i.stack.imgur.com/omYFE.png" alt="enter image description here"></p>
  
  <p>I have a check box named <code>post</code> in a continuous (tabular) form i want it to be automatically disabled i.e. locked if <code>post=true</code> while the rest of the <code>post</code> in the datasheet which are <code>post=false</code> remained enabled i.e. unlocked in the visual code builder i tried the following </p>
  
  <p>approach 1</p>
  
  <pre><code>If Me.Post = False Or Me.NewRecord Then
      Me.Post.AllowEdits = False
  Else
      Me.Post.AllowEdits = True
  End If
  </code></pre>
  
  <p>approach 2</p>
  
  <pre><code>If Me.Post = True Then
      Me.Post.Locked = True
  Else
      Me.Post.Locked = False
  End If
  </code></pre>
  
  <p>but none of them worked in scope of the form <code>Private Sub Form_Loan_Payment()</code> and when i applied the following</p>
  
  <pre><code>If Me.Post = True Then
      Me.Post.Locked = True
  Else
      Me.Post.Locked = False
  End If
  </code></pre>
  
  <p>In <code>Private Sub Post_Click()</code> it disabled all the post in the entire data sheet and it that after the check box was updated and if i reload the form all the post are enabled again</p>