|
-
Sep 5th, 2001, 05:22 AM
#1
Thread Starter
Lively Member
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
if at first you don't succeed, drink the rest of the bottle and loop to the same place tomorrow
-
Sep 5th, 2001, 05:25 AM
#2
what's the code you're using at the moment for when the user clicks on it?
-
Sep 5th, 2001, 05:38 AM
#3
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.
-
Sep 5th, 2001, 05:41 AM
#4
better still, don't use the Click event, use the ItemClick event.
-
Sep 5th, 2001, 05:57 AM
#5
Thread Starter
Lively Member
many thanks i had tried the listview1.listitems but didn't go for a further . that would have done it
if at first you don't succeed, drink the rest of the bottle and loop to the same place tomorrow
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|