listbox and set focus

  • Thread starter Thread starter seeker
  • Start date Start date
S

seeker

I have a list box on a form and have the following code onload for form

Private Sub Form_Load()
Me.lbxNameSearch.SetFocus

End Sub

when the form opens it does not set focus to listbox. The first record is
not hilighted. What is wrong with above code?
 
Thank you that solved THAT problem. now i can not move up and down in the
list box with the arrow keys. If I click the selected record with mouse then
I can move through the listbox with arrow keys. How can I make arrow keys
work without clicking the mouse?
 
Back
Top