[AccessD] A2K: Calculate Percentages

Stuart McLachlan stuart at lexacorp.com.pg
Tue Mar 23 21:00:51 CST 2004


On 24 Mar 2004 at 13:55, Darren DICK wrote:

> Hello all 
> Having a brain fade here
> Need to work out the Dollar amount of a percentage of a grand total
> 
> I have a combo that has values incrementing by 5 from 5 to 100 representing percentages EG 5,10,15,20 etc
> If I select say...20 from that combo, that means I want to see 20 percent of a total (say...$250)
> on a form eg 
> So 20 percent of $250 is $50. But what is the syntax I need to do this?
> EG Me.txtGrandTotal =$250.00. Me.cboPercentages = 20 So 
> me.txtCalculatedPercentageOfTotal.ControlSource = What, in order to show $50.00 ????
> 

Me.txtGrandTotal * Me.cbiPercentage / 100

(Percentage mean "out of a hundred" - so just dividing by 100 gives 
you  1%)


 
-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.






More information about the AccessD mailing list