Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Calculation into Dollar Amount

Geek News

Calculation into Dollar Amount
"phuser" <phuser[ at ]sasktel.net> 11/12/2008 3:37:07 PM
I have an Order Form that automatically calculates a percentage

Private Sub FreightCharge_AfterUpdate()

[adminfeetbl] = [OrderSubtotal] * 0.02
[SubtotalBAF] = [OrderSubtotal] + [FreightCharge]
[InvoiceTotal] = [OrderSubtotal] + [FreightCharge] - [adminfeetbl]

End Sub

But I am starting to see some serious rounding issues, is there a way to
specify that the amount should be in currency or only have 2 decimal spaces?

Thanks for all!!



Re: Calculation into Dollar Amount
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_gmail.com> 11/12/2008 4:05:02 PM
Try:

[adminfeetbl] = CCur([OrderSubtotal]) * CCur(0.02)
[SubtotalBAF] = CCur([OrderSubtotal]) + CCur([FreightCharge])
[InvoiceTotal] = CCur([OrderSubtotal]) + CCur([FreightCharge]) -
CCur([adminfeetbl])


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"phuser" <phuser[ at ]sasktel.net> wrote in message
news:f4-dncwKSva5ZYfUnZ2dnUVZ_rbinZ2d[ at ]posted.sasktel...
[Quoted Text]
>I have an Order Form that automatically calculates a percentage
>
> Private Sub FreightCharge_AfterUpdate()
>
> [adminfeetbl] = [OrderSubtotal] * 0.02
> [SubtotalBAF] = [OrderSubtotal] + [FreightCharge]
> [InvoiceTotal] = [OrderSubtotal] + [FreightCharge] - [adminfeetbl]
>
> End Sub
>
> But I am starting to see some serious rounding issues, is there a way to
> specify that the amount should be in currency or only have 2 decimal
> spaces?
>
> Thanks for all!!
>
>
>


Re: Calculation into Dollar Amount
"phuser" <phuser[ at ]sasktel.net> 11/12/2008 4:49:20 PM
Thanks So Much Douglas,

Doesnt generate an Error & once I've created a dozen or so Invoices I'll see
if the calucation is more accurate. Thanks Again

Pauline


"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_gmail.com> wrote in message
news:%23IH2sBORJHA.1148[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
> Try:
>
> [adminfeetbl] = CCur([OrderSubtotal]) * CCur(0.02)
> [SubtotalBAF] = CCur([OrderSubtotal]) + CCur([FreightCharge])
> [InvoiceTotal] = CCur([OrderSubtotal]) + CCur([FreightCharge]) -
> CCur([adminfeetbl])
>
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "phuser" <phuser[ at ]sasktel.net> wrote in message
> news:f4-dncwKSva5ZYfUnZ2dnUVZ_rbinZ2d[ at ]posted.sasktel...
>>I have an Order Form that automatically calculates a percentage
>>
>> Private Sub FreightCharge_AfterUpdate()
>>
>> [adminfeetbl] = [OrderSubtotal] * 0.02
>> [SubtotalBAF] = [OrderSubtotal] + [FreightCharge]
>> [InvoiceTotal] = [OrderSubtotal] + [FreightCharge] - [adminfeetbl]
>>
>> End Sub
>>
>> But I am starting to see some serious rounding issues, is there a way to
>> specify that the amount should be in currency or only have 2 decimal
>> spaces?
>>
>> Thanks for all!!
>>
>>
>>
>
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net