title: vba Checkbox if else condition in Subform, access
body: <p>I have a main form with several tab controls with subforms in them. On the first tab or subform I have a "checkbox 1", which shall be:</p>
  
  <ul>
  <li>checked if "textbox 1" is not empty</li>
  <li>unchecked if "textbox 1" is empty</li>
  </ul>
  
  <p>The code is directly put into the Class Object of "subform 1", that's why I thought I could use <code>Me</code>. </p>
  
  <p>Here is my code, but I always get error messages :(</p>
  
  <pre><code>Private Sub Ctltextbox_1_AfterUpdate()
      If Len(Ctltextbox_1.Value) = 0 Then
          Me.checkbox_1.Value = 0
      Else
          Me.checkbox_1.Value = -1
      End If
  End Sub
  </code></pre>
  
  <p>That way I am getting the </p>
  
  <blockquote>
    <p>Run-time error '2448': You can't assign a value to this object.</p>
  </blockquote>
  
  <p>On the line that attempts to assign <code>-1</code> to <code>Me.checkbox_1.Value</code>.</p>