>I don't know if the itemdata property exists in VB.NET. I was able to bind the dataset to the listbox by using:
>
>ListBox1.DataSource = lADO.objDataSet.Tables("employee")
>ListBox1.DisplayMember = "empname"
>ListBox1.ValueMember = "id"
>
>However, I can't figure out how to retrieve the "id" or "empname" information.
>Just for test purposes. I would like to iterate through the items in the listbox and display in a message box the empname and id. I can't believe I am having such trouble with an elementary thing. This was easy in VFP. I appreciate the help.
I haven't notice that you were on .Net.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com