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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top