ms-accessms-access-2013expressionbuilder

Select first value from list using expression builder - Access 2013


I'm currently trying to set the default value of a combobox to the first value in that combobox using the expression builder. The box is populated by a table with one column. I'm quite new to Access, so sorry in advance if this is a silly question. Here's my code so far that doesn't work.

=[cboProduct].[ListIndex](0)

Any help would be greatly appreciated!

Thank you,

Austin


Solution

  • It is:

    =[cboProduct].ItemData(0)
    

    or to be strict:

    =[cboProduct].ItemData(Abs([cboProduct].ColumnHeads))