Click to See Complete Forum and Search --> : Help - List Boxes


angelis
September 6th, 2001, 10:32 AM
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

michi
September 6th, 2001, 10:46 AM
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