-
listviews
I have a listview which when the form is shown is blank. The user then selects the options from some buttons and that info is pdisplayed in the listview.
how can i stop my programme crashing if the user clicks on the empty listview.
Any help will be much appreciated
Nuts
-
what's the code you're using at the moment for when the user clicks on it?
-
Under the click event for the listview paste this line in:
Code:
me.listview1.listitems.count = 0 then exit sub
This will check if thare are any elements in the listview, and the stop the execution of the sub/function.
-
better still, don't use the Click event, use the ItemClick event. :)
-
many thanks i had tried the listview1.listitems but didn't go for a further . that would have done it