Link to home
Start Free TrialLog in
Avatar of Basicfarmer
BasicfarmerFlag for United States of America

asked on

Select listview item programatically

Experts, I populate a listview from a database. I have a form for the user to add new items or edit an item. When the user adds a new item I repopulate the listview. When this happens i would like to have the item that was just entered selected for the user.
 
After the INSERT query i retrieve the ID of the record that was just inserted. When the items are added to the listview initially i use the name property of the list item and set it to the ID of the record.

lstItem.name = reader.item("ID")

I would never know the index of the item that was just entered, only the ID of the record.
With the setup i have is there a way to select the item i just entered.
ASKER CERTIFIED SOLUTION
Avatar of Luis Pérez
Luis Pérez
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Basicfarmer

ASKER

Thanks for the great response...