Q. Combo box displaying numbers not desired values.

  • Thread starter Thread starter Jim Jones
  • Start date Start date
J

Jim Jones

Hi,

I have a combo box on a sub form. The subform is based on a table,
where I specified that field as a combo box, and "typed in the values"
that I want.

That field will also store the desired choice from the combo box.
But, when I open my form, and click on the down arrow of the combo box
on the xub form, I just see rows of number 1 - 30. I should see my
text values.

Please help,

Thanks,
Jim
 
Hi,

I have a combo box on a sub form. The subform is based on a table,
where I specified that field as a combo box, and "typed in the values"
that I want.

That field will also store the desired choice from the combo box.
But, when I open my form, and click on the down arrow of the combo box
on the xub form, I just see rows of number 1 - 30. I should see my
text values.

A Combo Box control has a Rowsource, which is usually a Query. In this
case, you want a Query returning the two fields from your table.

The Control Source of the combo determines which field in the Form's
recordsource the selected value will be stored into; this should be a
numeric field in the form's query.

The Bound Column of the combo is which field will get stored - in this
case if the ID is in the first column and the text in the second, this
should be 1.

The critical property in this case is the ColumnWidths. It's a string
of numbers specifying the width of the display of each field in the
rowsource. A zero width is still part of the combo, but will not be
visible; when the combo is not dropped down you'll see the first
nonzero width field. So if your Rowsource has two fields, ID and
textfield, set the ColumnWidths property to 0;1.2 to store the ID but
display the textfield in a 1.2 inch wide space.
 
A Combo Box control has a Rowsource, which is usually a Query. In this
case, you want a Query returning the two fields from your table.

The Control Source of the combo determines which field in the Form's
recordsource the selected value will be stored into; this should be a
numeric field in the form's query.

The Bound Column of the combo is which field will get stored - in this
case if the ID is in the first column and the text in the second, this
should be 1.

John, Ironically enough, on the combo wizard, it asks me where I want
to store the field, but it also let me say wich table to enter it
into, which I found ironic. It let me do it, but is return mixed
results. Some datavalues and some numerics.
The critical property in this case is the ColumnWidths. It's a string
of numbers specifying the width of the display of each field in the
rowsource.
A zero width is still part of the combo, but will not be
visible; when the combo is not dropped down you'll see the first
nonzero width field. So if your Rowsource has two fields, ID and
textfield, set the ColumnWidths property to 0;1.2 to store the ID but
display the textfield in a 1.2 inch wide space.

You've helped me before and no doubt would know exactly the problem,
if you had a better explanation. So here it is:

I have a subform, with a combo box. This subform has been linked to a
table, which works fine, in displaying the desired data.

I've added a combo box, with a list of items that I want to see, and
include in the record, when I click on one of the items.

The corresponding table has been set up as combo box, and I told the
table combo box wizard that "i will type in the values". And I did.
And, when I have the table open, this function works just fine.

That's it.

I suspect Access doesn't like storing an item in the same record field
space, where I'm going to make a selection, unless I somehow put in
code (involving the notinlist function, etc).

The form though, now displays both items and numbers ( I didnt put in
any numbers), in a single column.

Is a combo box too much ? Should I have specified list box instead ?

Thanks,
Jim
 
John, Ironically enough, on the combo wizard, it asks me where I want
to store the field, but it also let me say wich table to enter it
into, which I found ironic. It let me do it, but is return mixed
results. Some datavalues and some numerics.



You've helped me before and no doubt would know exactly the problem,
if you had a better explanation. So here it is:

I have a subform, with a combo box. This subform has been linked to a
table, which works fine, in displaying the desired data.

I've added a combo box, with a list of items that I want to see, and
include in the record, when I click on one of the items.

The corresponding table has been set up as combo box, and I told the
table combo box wizard that "i will type in the values". And I did.
And, when I have the table open, this function works just fine.

That's it.

I suspect Access doesn't like storing an item in the same record field
space, where I'm going to make a selection, unless I somehow put in
code (involving the notinlist function, etc).

The form though, now displays both items and numbers ( I didnt put in
any numbers), in a single column.

Is a combo box too much ? Should I have specified list box instead ?

Thanks,
Jim

Scratch all the above.

What it's doing now is duplicating the entries.

Jim
 
John, Ironically enough, on the combo wizard, it asks me where I want
to store the field, but it also let me say wich table to enter it
into, which I found ironic. It let me do it, but is return mixed
results. Some datavalues and some numerics.
You've helped me before and no doubt would know exactly the problem,
if you had a better explanation. So here it is:

I have a subform, with a combo box. This subform has been linked to a
table, which works fine, in displaying the desired data.

What's the Recordsource property (SQL please) of the combo box? What
is the datatype of the field you're using as the combo's Control
I've added a combo box, with a list of items that I want to see, and
include in the record, when I click on one of the items.
The corresponding table has been set up as combo box, and I told the
table combo box wizard that "i will type in the values". And I did.
And, when I have the table open, this function works just fine.

Ok... so this is a Lookup combo box (you really should not be using
table datasheet for much of anything)... right? And you're all right
with it being a static list of values which you will rarely or ever
add to or change?
That's it.

I suspect Access doesn't like storing an item in the same record field
space, where I'm going to make a selection, unless I somehow put in
code (involving the notinlist function, etc).
The form though, now displays both items and numbers ( I didnt put in
any numbers), in a single column.

I do not understand this at all. I'm sorry, but I'm just baffled!

Please list the following combo properties:

RowSourceType
RowSource (just a couple of sample values if it's List of Values)
ControlSource
ColumnCount
BoundColumn
ColumnWidths
 
Back
Top