To refresh a listview, you need to do a couple of things.
First, you need to add a line of code to the procedure where the listview would need to be refreshed:
Listview.ListItems.Clear
{where "Listview" is the name of the listview control}
This will erase all the data that is in your listview.
Then, you need to call the procedure which you used to populate the listview in the first place.
Thus, you code in the procedure that needs the listview updae might look somthing like this:
. . . {Primary Code for Procedure}
Listview.ListItems.Clear
LoadListview {the sub used to initially fill the listview}
Exit Sub
End Sub
This is the only way that I have discovered to refresh the data in a listview.




Reply With Quote