ComboBox Value List

I

Iram

Hello.
I am using Access 2003.

I have a form that stores selections such as "Married" "Divorced" "Widowed"
as numbers from a Group Option in number format 1,2,3.

On a seperate form where I have my reports I am trying to create a combobox
with selections of "Married";"Divorced";"Widowed" however since these
selections were saved as numbers from a group option how do I configure the
settings in the combox to include one hidden column with 1, 2, 3 that are
linked to the visual Married, Divorced, Widowed? Or do you recommend we do
this some other way?


Thanks
Iram/mcp
 
K

Klatuu

Create a multi column combo. The first column should be the numerical value.
The second should be the text description. Your value list would look like:

1;"Married";2;"Divorced";3;"Widowed"

Set these properties:
Bound Column: 1
Column Count : 2
Column Widths: 0"; 1"

Users will not see the first column because its width is 0, they will see
only the second column. The width can be whatever it takes to show the
longest value.

The value saved in the table will be the first column.

One other point when using multi column combos. The column numbering starts
with 0. This is the confusing part, because the Bound Column property should
be 1. In this case, it means the first column which is Column(0). Got a
headache yet?

So to use the value of the first column it would be:
Me.cboStatus.Column(0)
and for the second column:
Me.cboStatus.Column(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