A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Box



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2007, 10:06 PM posted to microsoft.public.access.forms
Dwayne B
external usenet poster
 
Posts: 3
Default Combo Box

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
--
Dwayne
  #2  
Old April 30th, 2007, 10:19 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Combo Box

On Mon, 30 Apr 2007 14:06:02 -0700, Dwayne B
wrote:

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]
  #3  
Old May 1st, 2007, 01:27 PM posted to microsoft.public.access.forms
Dwayne B
external usenet poster
 
Posts: 3
Default Combo Box

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
--
Dwayne


"John W. Vinson" wrote:

On Mon, 30 Apr 2007 14:06:02 -0700, Dwayne B
wrote:

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]

  #4  
Old May 1st, 2007, 07:01 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Combo Box

On Tue, 1 May 2007 05:27:01 -0700, Dwayne B
wrote:

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]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:28 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.