combo box problem
I am developing a windows application, my database is in MS-Access, i have made one form which have 3 combobox, 1st for productkey, 2nd for employee name and 3rd for serial no. what i want is that when i fill the employee name then automatically the 3rd one i.e serial no. should be filled with that employees serial no. Please help me how to do it.
Nilanka DharmadasaPosted Nov 18, 2009, 12:11 AM
Then forget the database connction part in my code.
Focus on the displaymeber, valuemember properties of the combobox2 and 3.
In combobox2 when you set those properties as I have set, and using the selected index changed event of combo box 2 you can get the expected outcome .
If you still have any problem pls ask.
If you find this answer useful please do not forget to mark it as accepted.
Nilanka DharmadasaPosted Nov 18, 2009, 12:02 AM
I assumed you use c#.
1. First load your combo boxes with the data in database. Here, replace connection string, table names and column names in my code with the correct names.
2. Then use selected index changed event of combo 2 to display the serial number in combo 3 of the selected employee in combo 2.
If you have any problem please ask.
If you find this useful, please do not forget to amrk this as accepted..
Vandana SardanaPosted Nov 17, 2009, 11:59 PM
Nilanka DharmadasaPosted Nov 17, 2009, 11:16 PM
What is the language?
C# or VB? and do you need the code to connecting to DB as well?