Search code examples
ms-accessvbams-access-2016

MS ACCESS: Force showing only X field in combobox


So far, all I have found are answers that suggest I show all fields up until the the field I want and hiding the other fields by reducing their size to 0, but is there any way to force the combobox to only show the field I want without requiring I adjust column sizes?

CLARIFICATION:

  1. When I set BoundColumn = 2, I get this result.

  2. So far, I have only been able to find solutions that require I set ColumnCount = 2 and set the ColumnWidths = 0";x" to hide the 1st column as seen here.

Q: Is there no way that I can simply pick this column to be the source for the combobox without doing as was described in sentence 2?

I hope that sufficiently clarifies my question.

It seems like this should be an obvious feature and I don't understand why it's not.

If a solution does exist that I haven't found yet, then kindly direct me to it.

Thanks for reading.


Solution

  • the data/row source of the combobox can bet set as

     SELECT yourColumn FROM tbl;
    

    enter image description here

    Then you dont have to bother with setting bound column or anything else.