title: Accessing Datasheet caption in Access 2007 with VBA
body: <p>For some reason the text from the associated table's field description auto-populated the datasheet caption property on my form instead of the status bar text property. I want update the status bar text with this value. I am not sure how to reference the datasheet caption in design mode and run the following code:</p>
  
  <p>Suggestions?</p>
  
  <pre><code>Dim ctl As Control
  
  For Each ctl In [Forms]![frmInventory].Controls
      Select Case ctl.ControlType
          Case acCommandButton, acCheckBox, acTextBox, acListBox, acComboBox, acToggleButton
          ctl.StatusBarText = ctl.Properties("DataSheetCaption")
      End Select
  Next
  </code></pre>