![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2004
Posts: 1
Rep Power: 0
![]() |
I have a combobox in my form which shows the employee names.If I select one of the names from it I want its corresponding employee id stored in the database.How can I do this?Please help me.Thanks in advance
|
|
|
|
|
|
#2 |
|
Newbie
Join Date: Sep 2004
Location: South Africa, Eastern Cape
Posts: 28
Rep Power: 0
![]() |
You can either bind all the items on the form including the combo box or you can use a SQL statement. You then manually add the information to the components on the form. The SQL statement will be as a normal SQL statement except at the end you will have WHERE empName='" & addVarNameHere & "';". This might not be the best way, but it is a way.
__________________
Be vewwy vewwy quiet. I'm hunting wuntime ewwors. |
|
|
|
|
|
#3 |
|
Newbie
|
ComboBox.DataSource = Employees // SomeArrayof employees(ArrayList, Array, Collection)
ComboBox.Displaymember = EmployeeName ComboBox.ValueMember = EmployeeId if you call ComboBox.SelectedValue you will get employee Id value
__________________
Try ProjectTracking.NET tool, complete online project tracking solution. ProjectTracking.NET is designed to simplify development and management of small and medium sized projects for dislocated teams. Read more about Project Tracking here: http://www.ilumnis.com/Products/ProjectTracking.aspx |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|