listbox and set focus

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?
 
S

seeker

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top