Search code examples
vbams-accesscomboboxms-access-2010ms-access-2007

Calling a combobox column in MS Access VBA


I have a form whose combobox has two columns, but only one is shown (width 0;1).

If the user selects a row, I want to return the value of the other (hidden) column of the same row. My search showed that you can use the BoundColumn-property to change this, but I want to use the call in VBA itself.

I am trying to program the WHERE-clause:

variable = Forms!myFormName!myComboboxName.Column(0)

but that won't work.

Can someone tell me what is wrong about that construction?

Thanks in advance.

P.s.:I can provide my complete code if required


Solution

  • If anyone else comes across this problem, see my question answered here:

    Access selecting combobox column in VBA returns "function not defined"-error