title: Length checking in VBA with null
body: <p>I have some code that is meant to check the length of the values in the text boxes, and if any of the boxes has no content the length of the string is 0 (or null).  Here is the code:</p>
  
  <pre><code>If (Len(Form_MainScreen.Ctl48.Value) Or Len(Form_MainScreen.Ctl49.Value) Or _
      Len(Form_MainScreen.Ctl50.Value) Or Len(Form_MainScreen.Ctl51.Value) Or _
      Len(Form_MainScreen.Ctl52.Value) Or Len(Form_MainScreen.Ctl53.Value) Or _
      Len(Form_MainScreen.Ctl54.Value) = 0) Then
                Do X
  Else
                Do Y
  End If
  </code></pre>
  
  <p>When one string is blank, the length check becomes "null" and so does the whole statement.
  But if the length checks are all not null, the if statement becomes a "1" and then procedes to execute the Do X procedure again.</p>
  
  <p>Any idea of what I can do?</p>
  
  <p>Thanks,
  Tim</p>