title: How to add column data as listbox items using access vba
body: <p>I'm trying to add table column data as listbox items, i tried to add table column names as list box items. But how do i add table column data as listbox items. 
  I have a table</p>
  
  <pre><code>Column1
  
   A
   B
   C
   D
   E
  </code></pre>
  
  <p>I tried adding table column names as listbox items, vba</p>
  
  <pre><code>Sub item1() 
  
  On Error Resume Next
  
  Dim i As Integer 'Index for loop
  
      With Me.lstbox
          .RowSourceType = "Value List" 'Set rowsource type
          .RowSource = "" 'Clean combo contents
      End With
  
      For i = 1 To CurrentDb.TableDefs("table1").Fields.Count
      Me.lstbox.AddItem (CurrentDb.TableDefs("table1").Fields(i -1).Name)
  
      Next i
       End with
  End sub
  </code></pre>
  
  <p>How do i have A,B,C,D,E as listbox items.</p>