Combo Box

D

Dwayne B

Hi,can any one tell me how to update a different field based on what you pick
in the Combo Box? Example if I pick "60K" from my combo ,I would like my next
field to update to a set # such as 60,000 ,I have a different values in the
combo Box that I want to set to different values in the next field .I have
tryed a little Variable(Dim "" As) coding but can not get the thing to
work,Thanks for any help
 
J

John W. Vinson

Hi,can any one tell me how to update a different field based on what you pick
in the Combo Box? Example if I pick "60K" from my combo ,I would like my next
field to update to a set # such as 60,000 ,I have a different values in the
combo Box that I want to set to different values in the next field .I have
tryed a little Variable(Dim "" As) coding but can not get the thing to
work,Thanks for any help

Why do you need two fields?

You can bind the combo box to your number (currency?) field directly; use a
two-column combo, based on a table with records like

ShowNum StoreNum
60K 60000
120K 120000
1K 1000
1M 1000000

and so on... set the combo's Column Count to 2, its Bound Column to 2 (to
store the numeric value), and its ColumnWidths to something like 0.25;0 to
display only the text column.

John W. Vinson [MVP]
 
D

Dwayne B

Thanks for the reply,the reason I tought I needed two fields was that I have
more than 1 Text represented by a number. In fact the same number 100,000 is
used twice one called gear oil and the other called overhead ,and I will use
this number to perform a calculation in a query.So when I look at my table I
wanted to be able to see the text and its equal number value in the next
field.Is there a way to use the way you described and put two different
values in two different fields based on a combo box?Am I making any scence I
know its got to hard to tell exactly what I mean ...Thanks again
 
J

John W. Vinson

Thanks for the reply,the reason I tought I needed two fields was that I have
more than 1 Text represented by a number. In fact the same number 100,000 is
used twice one called gear oil and the other called overhead ,and I will use
this number to perform a calculation in a query.So when I look at my table I
wanted to be able to see the text and its equal number value in the next
field.Is there a way to use the way you described and put two different
values in two different fields based on a combo box?Am I making any scence I
know its got to hard to tell exactly what I mean ...Thanks again

Yes. You could have your Combo Box based on an alphabetically-sorted table
containing records like

50K 50000
60K 60000
Gear Oil 100000
Overhead 100000
100K 100000

or whatever values you want.

If you're working directly in a table datasheet... DON'T. Table datasheets are
of VERY limited utility; you cannot and should not try to do calculations in
Tables. Do your data entry and your calculations on a Form instead. And you
certainly do *not* need to store "50K" in one field and 50000 in another
field, other than in this lookup table!

John W. Vinson [MVP]
 
Top