PC Review


Reply
Thread Tools Rate Thread

How do I replace a value generated in a calculated control.

 
 
=?Utf-8?B?QWRhbQ==?=
Guest
Posts: n/a
 
      17th May 2006
I have a calculated control generating a value of 2 other controls. My
problem is that on occasions the result is an undesirable number because of
rounding.
E.g. I multiply a subtotal field by a percentage to get a tax amount and add
these together to get a grand total, then subtract any deposits or payments
made to provide an amount outstanding. Sometimes i get a $-0.01 or $0.01 that
i dont want because of rounding. How can i replace this with $0.00 whenever
the calculation generates these undesirable numbers.
=[subtotal]*12.5/100...(this equals my tax amount)
then =[subtotal]+[taxamount] ...(get my grand total)
then =[grandtotal]-[paymentsmade]...(gives me my amount outstanding)
So i enter a payment and the result in the [amountoutstanding] calculated
control can end up being $0.01 even thought the payment amount matched the
shown amount outstanding. (because of rounding)


 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      17th May 2006
How about treating it as zero if it is less than (say) +/- 2 cents:
=IIf(Abs([grandtotal]-[paymentsmade]) < 0.02, 0,
[grandtotal]-[paymentsmade])

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Adam" <(E-Mail Removed)> wrote in message
news:AA4C752E-55C0-4D02-8D28-(E-Mail Removed)...
>I have a calculated control generating a value of 2 other controls. My
> problem is that on occasions the result is an undesirable number because
> of
> rounding.
> E.g. I multiply a subtotal field by a percentage to get a tax amount and
> add
> these together to get a grand total, then subtract any deposits or
> payments
> made to provide an amount outstanding. Sometimes i get a $-0.01 or $0.01
> that
> i dont want because of rounding. How can i replace this with $0.00
> whenever
> the calculation generates these undesirable numbers.
> =[subtotal]*12.5/100...(this equals my tax amount)
> then =[subtotal]+[taxamount] ...(get my grand total)
> then =[grandtotal]-[paymentsmade]...(gives me my amount outstanding)
> So i enter a payment and the result in the [amountoutstanding] calculated
> control can end up being $0.01 even thought the payment amount matched the
> shown amount outstanding. (because of rounding)
>
>



 
Reply With Quote
 
=?Utf-8?B?QWRhbQ==?=
Guest
Posts: n/a
 
      18th May 2006
Thank you Allen I'll give that a try...most fustrating
Again...thank you very much.


"Allen Browne" wrote:

> How about treating it as zero if it is less than (say) +/- 2 cents:
> =IIf(Abs([grandtotal]-[paymentsmade]) < 0.02, 0,
> [grandtotal]-[paymentsmade])
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Adam" <(E-Mail Removed)> wrote in message
> news:AA4C752E-55C0-4D02-8D28-(E-Mail Removed)...
> >I have a calculated control generating a value of 2 other controls. My
> > problem is that on occasions the result is an undesirable number because
> > of
> > rounding.
> > E.g. I multiply a subtotal field by a percentage to get a tax amount and
> > add
> > these together to get a grand total, then subtract any deposits or
> > payments
> > made to provide an amount outstanding. Sometimes i get a $-0.01 or $0.01
> > that
> > i dont want because of rounding. How can i replace this with $0.00
> > whenever
> > the calculation generates these undesirable numbers.
> > =[subtotal]*12.5/100...(this equals my tax amount)
> > then =[subtotal]+[taxamount] ...(get my grand total)
> > then =[grandtotal]-[paymentsmade]...(gives me my amount outstanding)
> > So i enter a payment and the result in the [amountoutstanding] calculated
> > control can end up being $0.01 even thought the payment amount matched the
> > shown amount outstanding. (because of rounding)
> >
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace formula with calculated value datakman Microsoft Excel Worksheet Functions 1 10th Jul 2009 07:36 PM
How do I not replace formula with calculated value. vkj Microsoft Excel Misc 3 17th Mar 2009 07:01 PM
How to replace a cell's formula with a non-zero calculated value? medecin Microsoft Excel Worksheet Functions 1 3rd Jun 2008 08:45 PM
replace field with a calculated value wgtubbs Microsoft Access 6 25th May 2008 02:45 PM
zeros generated by a calculated item in pivot table =?Utf-8?B?RnJlZGVyaWM=?= Microsoft Excel Worksheet Functions 3 27th Oct 2005 01:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:30 PM.