title: Access: VBA to Add Conditional Formating to each Column in a subform(Datasheet)
body: <p>I've got an Access form with a subform in datasheet mode with a lot of columns. I'd like to apply conditional formatting to each column, but I'm having trouble finding how to set up this loop. </p>
  
  <p>I know how to add conditional formatting as a one-off like:</p>
  
  <pre><code>Forms!ParentForm!Subform.Forms.Column.FormatConditions.Add(acExpression, blah)
  </code></pre>
  
  <p>But I'm having trouble figuring out how to loop through something like this for each column. It would help to know what the general object name is for each of these columns.... is it a Control object?</p>
  
  <p>Anyways, I was thinking it should be something like this:</p>
  
  <pre><code>For Each Column In Me.SubForm
        Me.SubForm.Form.Column.FormatConditions.Add(...,...)
  next column
  </code></pre>
  
  <p>This amateur would be grateful for any help from the more experienced community. Thanks!</p>