![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Probably really simple but I cant work it out... I have a list box on a form with a few records in. When I open the form the first record is sort of highlight with a dashed box, when I cursor down the record changes to inverse video and from then on I can sroll up and down the records with the inverse video highlight. I just cant seem to get the form to open with the first record already highlighted in inverse video. I have tried setting the focus to the listbox on opening the form and I have also tried using sendkeys to imitate me pressing the down arrow but nothing seems to work. |
#3
| |||
| |||
|
|
Simon Rowe wrote: I just cant seem to get the form to open with the first record already highlighted in inverse video. |
|
In the Load event of the form, set the ListIndex property of the listbox to 0 (defaults to -1 I think) |
#4
| |||
| |||
|
|
Alternative: lst.Value = lst.ItemData(1) Darryl Kerkeslager Simon Rowe wrote: I just cant seem to get the form to open with the first record already highlighted in inverse video. "Bas Cost Budde" <b.costbudde (AT) heuvelqop (DOT) nl> wrote: In the Load event of the form, set the ListIndex property of the listbox to 0 (defaults to -1 I think) |
![]() |
| Thread Tools | |
| Display Modes | |
| |