Calculated currency field (increase percentage)

  • Thread starter Thread starter John Chiurato
  • Start date Start date
J

John Chiurato

I used a make table querry to create a calculated field by using the
expression
MARKUP: [PRICE]*0.45+3 (increase the price by 45% and add another $3).

When the new table is created I can set the field to currency so it
shows a correctly formatted amount but when I click in the field I see
$4.9567. The problem is when I export the data to a program to
generate web pages, the amont is shown in the four cent format.]

How do I stop this from happening? Thanks

John Chiurato
 
Hi

John Chiurato said:
I used a make table querry to create a calculated field by using the
expression
MARKUP: [PRICE]*0.45+3 (increase the price by 45% and add another $3).

When the new table is created I can set the field to currency so it
shows a correctly formatted amount but when I click in the field I see
$4.9567. The problem is when I export the data to a program to
generate web pages, the amont is shown in the four cent format.]

How do I stop this from happening? Thanks


The formatting doesn't change the data, it only changes the way it's
displayed. I think you have to round your result to wanted accuracy.
Something like:
ROUND([PRICE]*0.45+3,2) - accuracy a cent
or
ROUND([PRICE]*0.45+3,0) - accuracy a $

But be aware that in Access is used so-called banker's rounding: a tie is
rounded up or down depending previous digit being even or uneven.


Arvi Laanemets
 
I used a make table querry to create a calculated field by using the
expression
MARKUP: [PRICE]*0.45+3 (increase the price by 45% and add another $3).

When the new table is created I can set the field to currency so it
shows a correctly formatted amount but when I click in the field I see
$4.9567. The problem is when I export the data to a program to
generate web pages, the amont is shown in the four cent format.]

How do I stop this from happening? Thanks

Round it in the calculation expression:

MARKUP: Round([PRICE] * 0.45, 2) + 3.
 
Back
Top