CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2001
    Posts
    6

    Help - List Boxes

    Hi, I'm having a problem where I'm suppose to enter a surname in a text box if by any case there was more then one with the same name and list box would appear displaying there first name, I've been able to display the first names, however I can't seem to make a connection between the first and lastname so that the rest of the information on that particular person is displayed?
    Any help will be much appreciated



  2. #2
    Join Date
    May 2001
    Location
    Canada
    Posts
    182

    Re: Help - List Boxes

    If you have a use ID to identify users, you can store the ID in the ItemData property of the surname list box.

    ====
    Call lstSurName.AddItem(txtSurName.Text)
    lstSurNam.ItemData(lstSurNam.NewIndex) = UserID
    ===

    Then, whenever you click on a SurName in the SurName list, you can navigate to that person.

    ===
    Private Sub lstSurName_Click()

    'This is a function you need to work on
    Call ShowDetailInformation(lstSurName.ItemData(lstSurName.ListIndex))

    End sub
    ===



    Regards,

    Michi

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

Featured