Hi All,
I've been learning VB.NET for a few months, and I'd appreciate if someone could assist me with this query.
For illustration purposes, lets assume I have a database table with three fields - EmpID(Key), EmpName and EmpSales. I can populate a ListBox with the EmpName field. However, if the user selects an item in the ListBox, I want to get the corresponding entry in the EmpSales field and display it in a textbox.
I know how to do this if the ListBox was populated with the EmpID field because it is the key, but not otherwise. Also, the EmpName field could and does contain duplicates but are actually different records, i.e. two people with the same name.
Can someone please assist me with this.
Thanks,
Damien.
I've been learning VB.NET for a few months, and I'd appreciate if someone could assist me with this query.
For illustration purposes, lets assume I have a database table with three fields - EmpID(Key), EmpName and EmpSales. I can populate a ListBox with the EmpName field. However, if the user selects an item in the ListBox, I want to get the corresponding entry in the EmpSales field and display it in a textbox.
I know how to do this if the ListBox was populated with the EmpID field because it is the key, but not otherwise. Also, the EmpName field could and does contain duplicates but are actually different records, i.e. two people with the same name.
Can someone please assist me with this.
Thanks,
Damien.