Results 1 to 5 of 5

Thread: listviews

  1. #1

    Thread Starter
    Lively Member nutstretch's Avatar
    Join Date
    May 2000
    Location
    UK
    Posts
    85

    Question 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

  2. #2
    nullus
    Guest
    what's the code you're using at the moment for when the user clicks on it?

  3. #3
    AIS_DK
    Guest
    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.

  4. #4
    nullus
    Guest
    better still, don't use the Click event, use the ItemClick event.

  5. #5

    Thread Starter
    Lively Member nutstretch's Avatar
    Join Date
    May 2000
    Location
    UK
    Posts
    85
    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
  •  



Click Here to Expand Forum to Full Width