column collection

S

smk23

Is there a way to designate the name of a column rather than the index
position on a combobox column, i.e.

Me.cboMybox.Column("columnName")

rather than

Me.cboMybox.Column(2)

Thanks!!
Sam
 
M

Marshall Barton

smk23 said:
Is there a way to designate the name of a column rather than the index
position on a combobox column, i.e.

Me.cboMybox.Column("columnName")

rather than

Me.cboMybox.Column(2)


There is no built-in capability for that.

In a VBA standard module, you could declare variables or
constants with the column numbers:
Public Const MyName As Integer =2

Then any VBA module could use:
Me.cboMybox.Column(MyName)

but that will not carry over into control source
expressions.
 
Top