title: ListBox Multiselect in MS Access
body: <p>I have created a form to get all the field header names, but I'm unable to select multiple fields. Attached is for your reference.
  <a href="https://i.stack.imgur.com/Hxo5H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hxo5H.png" alt="enter image description here" /></a></p>
  <p>Following is the code used to get the Headers from the Master Table:</p>
  <pre><code>Private Sub Form_Load()
  'Call GetColumnNameFromIndex
  'Call List4_Click
  Dim rst As New ADODB.Recordset
  rst.Open &quot;SELECT * FROM Master_DataBase&quot;, CurrentProject.Connection, adOpenForwardOnly, adLockReadOnly
  ' Note: adOpenForwardOnly and adLockReadOnly are the default values '
  ' for the CursorType and LockType arguments, so they are optional here '
  ' and are shown only for completeness '
  
  Dim ii As Integer
  Dim ss As String
  For ii = 0 To rst.Fields.Count - 1
      ss = ss &amp; &quot;,&quot; &amp; rst.Fields(ii).Name
  Next ii
  
  Me.List4.RowSource = ss
  Debug.Print ss
  Me.Requery
  
  End Sub
  </code></pre>