Multicolumn combobox value list

A

Amy Blankenship

I have a combobox that I want to show a textual representation of a numeric
value, but I don't want to create a table in this specific instance. So I
want a multicolumn combobox. I thought I'd just be able to type in a
valueList separated by semicolons and have Access give me a numeric value
based on the position in the list, but no such luck. The help is very vague
on value lists in general, and I have not been able to find anything that
shows me how to have more than one column in my value list.

Thanks;

Amy
 
G

Guest

the value list for a combo box has no relations to the number of columns. It
is still entered as individual items seperated by ;
The Column Count property determines what will display in one row. for
example, I have a value list for the user to pick a month. Sometimes I need
the text and sometimes I need the month as a date. Here is the value list:

1;Jan;2;Feb;3;Mar;4;Apr;5;May;6;Jun;7;Jul;8;Aug;9;Sep;10;Oct;11;Nov;12;Dec

The Bound Column is Column1 because I use it the most. It can be addressed
as:
= Me.MyCombo
If Jan is showing as the selected row, the above will return 1
(Note, the Column Width property for column 1 is 0 so the user only sees the
text)
If I need the month's description, then:
= Me.MyCombo.Column(1)
will return "Jan"
(Column number references start with 0)
= Me.MyCombo.Column(0)
will return 1
 

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