PDA

Click to See Complete Forum and Search --> : DataComboBox and Textbox


qn18
Feb 22nd, 2000, 09:32 PM
Hi everyone

I have this question, please help me.

I have a DataComboBox that contains the Employee Name (but it will stored in database by EmployeeCode instead of EmployeeName), if I select the Employee Name in the DataComboBox, I would like to get the Position display on the textbox corresponding with that Employee. If you know how to do that, can you show me please? Thanks

QN

Forest Dragon
Feb 24th, 2000, 10:11 PM
You need to insert code in the Click event of the DataCombo that will open the database and find the position of the employee by using the Find method or something like that.

How to open the database? You can use an ADO Data Control and bind the TextBox to it so then when you move to the appropriate record, it updates automatically.
Another way is to use a Recordset object and give the TextBox the value of the Position field.

Hope that will help you!