Default (auto select row) in list box.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to have the listboxes on my form default (select/hightlight) the
first row in the box upon opening the form.

Any suggestions would be appreciated.
 
try putting this in the onLoad event procedure of your form:

me.YourListBox.setFocus
me.YourListbox.Listindex=0

-John
 
Thanks to you both. I got the solution.

John Welch said:
try putting this in the onLoad event procedure of your form:

me.YourListBox.setFocus
me.YourListbox.Listindex=0

-John
 
I tried this solution, but it does not work for me. The first row in the list
does not turn black. It is not selected. What do I do wrong?

thanks,
LVer
 
Sorry,...It did work.

LVer said:
I tried this solution, but it does not work for me. The first row in the list
does not turn black. It is not selected. What do I do wrong?

thanks,
LVer
 
Back
Top