Select record in ListView control

ejstefl

Registered User.
Local time
Today, 08:36
Joined
Jan 28, 2002
Messages
378
Hello all,

I'm working on a new database, and I'm not sure what the syntax is to select an item in ListView. Basically, I double click an item to open a form to edit the item. When I close the item, I have the ListView refresh (by rebuilding it). Of course, the first item is then selected, and not the one I was working on. I want to keep the focus on the item I was working on, but I'm not sure how to tell the ListView to select an item via code. Any help??

Also, how can I reference the value in one of the columns other than the first? Me.lvxItems.Object.SelectedItem will get me the first (key) column, but what if I need the value of the second (description) column?

Thanks,
Eric
 
Last edited:
WayneRyan said:
Eric,

This thread might help:

http://www.access-programmers.co.uk/forums/showthread.php?t=90104

Also you can look in the Sample Database Forum here (and use the
Search Facility) for Multiselect Listboxes.

Wayne

Wayne,

Thanks for the link, but that thread deals with listboxes. I am actually trying to figure out the Listview control, which is slightly different... interesting reading, though! Any other ideas?
 

Users who are viewing this thread

Back
Top Bottom