I'm working in access xp. My question, after populating a listview control
with several rows of data, how can I programmatically select the last row,
each time I populate my control.
Thanks.
just after you add last listitem write:
set LV.selecteditem= <last list item object>

Signature
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
> I'm working in access xp. My question, after populating a listview control
> with several rows of data, how can I programmatically select the last row,
> each time I populate my control.
>
> Thanks.
Ricky A. - 11 Jul 2004 17:59 GMT
How to I get the last list item? Not sure what the syntax would be for <last
list item object>.
Thanks.
> just after you add last listitem write:
> set LV.selecteditem= <last list item object>
[quoted text clipped - 4 lines]
> >
> > Thanks.
Alex Dybenko - 12 Jul 2004 07:24 GMT
well, depends how you load your listitems.you have something like:
myLI=LV.listitems.Add(...)
so when you finish just make last myLI selected.
but if you already applied sorting - then you have to find first what LI key
is last based on current sorting, and then make it seleceted

Signature
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
> How to I get the last list item? Not sure what the syntax would be for <last
> list item object>.
[quoted text clipped - 11 lines]
> > >
> > > Thanks.