If your combo contains and displaying columns like Id, EmpName, BasicSalary and so on then you could write following.
Let us say you have placed 3 text boxes named EmpId, EmpName and EmpBasicSalary on a form along with the combo.
On the AfterUpdate event of Combo, write the following code
Me.EmpId= me.Combo.Column(0)
Me.EmpName= me.Combo.Column(1)
Me.EmpBasicSalary= me.Combo.Column(2)
The sequence of column in the combo always begin with 0. Means Id will have Zero position and EmpName column will have 1st position and so on.
Hope this help
With kind regards,
Ashfaque
|