Incorrect Data in Combo Box

G

G.

Can I use a specific field in a table to display data in a combo box that is
on a form?

My issue is that I am trying to create a combo box from a table that has say
10 fields (field1 = primary key. then there is field2, field3, etc.). I make
a new form and add a bound control (say field2). Then right click on the
control and select Change To, tehn Combo Box. When I go to Form View the data
in the dropdown lists information from field1 and not field2? This happens no
matter which field I select as the combo box - field3, field4, etc. all would
show data from field1.

Any idea why?

I'd like to use the data in the combo box as the selection criteria for a
parameter query - I know how to do that thanks to the past info on this site
but am currently using a transatory query that I really would like to get rid
of if I can. Thank you.
 
K

KARL DEWEY

In form design view click on the combo, double click and select Properties.
What is the --
- Row Source
- Column Count
- Column Widths
- Bound Column
 
K

KC-Mass

The columns in a combo box are zero based so if you want the first column in
the combo box reference column(0); second column, Column(1), etc

Regards

Kevin
 
T

tina

your post is not clear.
My issue is that I am trying to create a combo box from a table that has say
10 fields (field1 = primary key. then there is field2, field3, etc.). I make
a new form and add a bound control (say field2).

your *form* is bound to the table described above? and you're binding a
combobox control to one of the fields in the table?

or is your form bound to another table? and the combobox control is bound to
a field in that other table? and you're trying to use the table described
above as the *RowSource* of the combobox control?

if the latter setup, you will presumably want the BoundColumn property of
the combobox control to remain at the default setting which is 1. to *hide*
that primary key column, and *show* another column, or columns, you need to
set the ColumnWidths property. for example, if you want to see fields 2, 3,
and 4, in the droplist, set the ColumnWidths property as

0"; 1"; 1"; 1"

adjust the visible columns to more or less than one inch, as needed. you'll
see the last three columns in the droplist; when you make a selection,
you'll *see* the field2 value in the combobox control - but the *stored
value of the control* will be the value in the BoundColumn 1

hth
 

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