Connecting Tech Pros Worldwide Help | Site Map

Balance

  #1  
Old November 12th, 2005, 03:33 PM
Gx
Guest
 
Posts: n/a
I have this combo box with the following products to choose from:
A,B,C

Each has its own percentage buyback rate.
ie. A has 50% B has 25% C has 10 %
My problem is how to associate these percentage rates to the product chosen
from the drop down menu combo box.
eg. choose A in combo box,
then in the next field "Amount" you type $100
as a consequence the next field called "Buyback Balance" would then show
$50.
Can this be done in a query?


  #2  
Old November 12th, 2005, 03:34 PM
Larry Linson
Guest
 
Posts: n/a

re: Balance


If the buyback rates are in the table, or another table with a foreign key
to the product table, create an extra column in the RowSource of your Combo
box, for the buyback rate and in the AfterUpdate event of the Combo, set it
into another text box as (assuming it is the third column, which for coding
purposes are numbered from 0, but in the Properties box are numbered from
1 - only a little confusing)

Me!txtAnother = Me!cboSelectProduct.Column(2)

where, of course, you replace "txtAnother" with the name of the TextBox on
your Form and "cboSelectProduct" with the name of the Combo Box on your
Form.

Larry Linson
Microsoft Access MVP

"Gx" <sky5@optusnet.com.au> wrote in message
news:3f9516ee$0$10617$afc38c87@news.optusnet.com.a u...[color=blue]
> I have this combo box with the following products to choose from:
> A,B,C
>
> Each has its own percentage buyback rate.
> ie. A has 50% B has 25% C has 10 %
> My problem is how to associate these percentage rates to the product[/color]
chosen[color=blue]
> from the drop down menu combo box.
> eg. choose A in combo box,
> then in the next field "Amount" you type $100
> as a consequence the next field called "Buyback Balance" would then show
> $50.
> Can this be done in a query?
>
>[/color]


  #3  
Old November 12th, 2005, 03:34 PM
andybriggs
Guest
 
Posts: n/a

re: Balance



Assuming the two fields are called Percentage and Amount, create a new
field in the query by typing:



BuybackBalance:Amount*Percentage



This will re-calculate when you alter either Percentage or Amount, and
can, of course, be front-ended in a form.



Hope this helps.


--
Andy Briggs
Elmhurst Solutions Limited
http://www.elmhurstsolutions.com


Posted via http://dbforums.com
  #4  
Old November 12th, 2005, 03:34 PM
MeadeR
Guest
 
Posts: n/a

re: Balance


It sounds as if you entered the values into the list box - and did not
use a table to fill the list box - is that correct?? If so then there
is no way to use a query to determine the value.

If you create a table for A, B, C and have a field for the % then once
the user selects a value you can get the assoc. % from the table - or
could even use the % as the identifying field (if there are no two
values with the same %.


"Gx" <sky5@optusnet.com.au> wrote in message news:<3f9516ee$0$10617$afc38c87@news.optusnet.com. au>...[color=blue]
> I have this combo box with the following products to choose from:
> A,B,C
>
> Each has its own percentage buyback rate.
> ie. A has 50% B has 25% C has 10 %
> My problem is how to associate these percentage rates to the product chosen
> from the drop down menu combo box.
> eg. choose A in combo box,
> then in the next field "Amount" you type $100
> as a consequence the next field called "Buyback Balance" would then show
> $50.
> Can this be done in a query?[/color]
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
permanently store balance result in a field of current table darendaren88 answers 1 October 5th, 2009 12:45 AM
Find remaining balance - not a simple SUM() maxx233 answers 1 February 28th, 2009 11:35 PM
Statements - Opening balance closing balance question. Paul H answers 3 June 27th, 2008 08:24 PM
Global var in Balance calculation Maria Mela answers 13 February 2nd, 2007 10:55 PM
opening balance - closing balance Greg answers 3 November 12th, 2005 11:50 PM