Take a value in a textbox form a combobox

samuvk

Registered User.
Local time
Today, 10:08
Joined
Mar 3, 2010
Messages
24
I have a combobox feed from a table with two differents fields (name and employeenumber) But I am only showing the name in the combobox.

Now Whenever I select the name in the combobox I want automatically to introduce the asociate employeenumer into a textbox.

I tried like this but I don't know what is wrong.

writing in the textbox (Control Source): = [Combobox].[Column](2)

Thank you very much
 
First off, I don't think you should have square brackets around Column.

= [Combobox].Column(2)


Secondly, if you only have 2 columns, name and employeenumber, there is no Column with the Index of 2!

Indexes are Zero-based, which means, going from left-to-right, they would be

Column(0)
Column(1)
 
Thanks

it works now
 

Users who are viewing this thread

Back
Top Bottom