Jaime Vaca Gutierrez
Jaime Vaca Gutierrez

Reputation: 19

Choose the lookup column from a combobox in MS Access

I have the fallowing scenario.

I have a simple form like this: Number 1 in the appended image.

And I have a combobox in it, that display data in two columns. When I start typing text, the combobox makes a search of the content like this: Number 2 in the appended image.

It fills data from the first column, like this: Number 3 in the appended image.

Is there a way I can tell MS Access in wich column I want to search by text I am typing? I want this behavior to happen fromt the data of the second column.

Images for the post

Upvotes: 0

Views: 115

Answers (1)

Sheils
Sheils

Reputation: 333

you can get the data from the second column by using

ComboBoxName.Column(1) in a vba code.

try inserting the following in the combobox after update event

msgbox me.combobo(1)

Upvotes: 1

Related Questions