Rounding to Curreny not Working

L

Len

Why is this code not working?

Me!TAXAMT = CCur(Me!TAXAMT)

When I click on a button to calculate sales tax, it still shows the seven
didgets.

The above instruction was 6.957333

Still showed 6.9.57333 not 6.96.

I thought the CCur rounded to Currency?

Help wound be appreciated and Thanks in Advance

Len
 
L

Len

Thanks for getting back to me.

What is the code to set it to two positions?

I guess I am confused because I have worked with international monitary
funds and no one in the world goes more than 3 decimals.
 
J

John Quinn

Len;

I can see you have a very old program.

If Me!TaxAmt is from the form than you must code it as follows:

Dim sglTax as Single

sglTax = Me!TaxAmt
sglTax = Round([sglTax],2)
Me!TaxAmt = sglTax

CCur was changed from 2 to 4 decimals about four years ago.

Microsoft went to the IBM DB II instruction.

Good Luck

J.Q.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top