Calculation into Dollar Amount

P

phuser

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!!
 
D

Douglas J. Steele

Try:

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

phuser

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 said:
Try:

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


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


phuser said:
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!!
 
Top