Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / ActiveX Controls / July 2004

Tip: Looking for answers? Try searching our database.

Select last row in list view control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ricky A. - 11 Jul 2004 15:11 GMT
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.
Alex Dybenko - 11 Jul 2004 18:37 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.