mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

 Checkbox delete issue

Author Message
TBsparky

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 1/20/2010
  • Status: offline
Checkbox delete issue Wednesday, January 20, 2010 10:00 AM (permalink)
0
Hey everyone, I'm having a little problem with my VB code. The program I am using is apart of a college project i have to create. Basically the search function within this program finds a person e.g. "Kari" and when the checkbox is clicked it should remove that person. However, the code for the checkbox is deleting the first record everytime and not the record selected, I was woundering if anyone could help me with the code?

Private Sub Check1_Click()
lst_name.ListIndex = 0
lst_surname.ListIndex = lst_name.ListIndex
lst_Pck_Point.ListIndex = lst_name.ListIndex
lst_Dest_Point.ListIndex = lst_name.ListIndex
lst_Times.ListIndex = lst_name.ListIndex
lst_name.RemoveItem lst_name.ListIndex
lst_surname.RemoveItem lst_surname.ListIndex
lst_Pck_Point.RemoveItem lst_Pck_Point.ListIndex
lst_Dest_Point.RemoveItem lst_Dest_Point.ListIndex
lst_Times.RemoveItem lst_Times.ListIndex
Check1.Value = 0
Check1.SetFocus
Check1.Value = 0
End Sub
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.8
    mbt shoes www.wileywilson.com