title: How to navigate items in a Listbox using Up and Down arrows
body: <p>I have a listbox in a form. The listbox is bound to 1 column.
  The form records and the ListBox Records on [CustomerName] field are both sorted <code>A-Z</code>.
  I want to be able to navigate the List Items using the <code>Up</code> and <code>Down</code> keys.
  But I currenly see the listbox is looking for a ID macth instead. Is it possible to to select the records sequentially using the <code>Up</code> and <code>Down</code> Keys?</p>
  <p>I have:</p>
  <pre><code>Private Sub Form_Current()
  Me.ListBox = Me.txtID.Value
  Exit Sub
  </code></pre>
  <p>I also have:</p>
  <pre><code>Private Sub ListBox_AfterUpdate()
  Dim rs As Dao.Recordset
  Set rs = Me.RecosetClone
  rs.FindFirst &quot;[ID] = ' &quot; &amp; Me.ListBox &amp; &quot; '&quot;
  If.Not rs.NoMatch Then
  Me.Dirty = False
  Me.Bookmark = rs.Bookmark
  Else
  Exit Sub
  End If
  rs.Close
  Set rs = Nothing
  End If
  
  End Sub
  </code></pre>
  <p>My attemp is:</p>
  <pre><code>Private Sub Form_Current()
  Me.ListBox = Me.txtID
  Dim itemPosition As long
  With ListBox
  If .ItemsSelected.Count = 0 Then
  Exit Sub
  itemPosition = .ItemsSelected(0)
  If .itemPosition &lt;&gt; 0 Then
  .Selected(itemPostion -1) = True
  Else
  .Selected(itemPostion +1) = True
  End With
  Exit Sub
  </code></pre>