Problem with currency display

R

Ray S.

I have the same problem posted by Don Garry on 3/9/2005, and I have not seen
any satisfactory response to it. Copying his initial post:

Hello, I have a form which has several calculated controls on it which are
tied to currency figures. For example I've got a control called SellingPrice
in which the format is set to currency and the decimals is set to auto. All
numbers show correctly as currency (eg. $356.71) until I put the focus on
the control at which time the control shows a swack of digits ?? (e.g.
$356.713244465656). The moment you put the focus on another control the
selling price goes back to the correct format.

I would have thought that the round function would have solved this but it
doesn't have any effect in how I'm using it.

I would sure appreciate it if someone could shed some light on this little
annoying problem I'm having.

Two suggestions were made. The first, to change the control format property
to 2 decimal places, which has not worked for me, as it did not for Don
Garry. The second, to "force" the fields to two decimal places using
formatcurrency([fieldname],2), which is essentially the same thing, I
believe, but does not work either. To me this is a serious problem, because
the failure to finally round and truncate the numbers causes errors in
balancing financial accounts.

Does anyone have an idea how to stop this? I'm having to export the table to
Excel where I can finally truncate the currency to two decimal places. Since
Access does not solve the problem I am forced to add another step to be able
to generate a text file for import into our general ledger accounting program
that will not cause balance errors. Can any Access genius please offer a
clean solution without having to do that extra step?
 
J

John Vinson

Can any Access genius please offer a
clean solution without having to do that extra step?

Use a Currency datatype rather than a Number... Double datatype. The
Currency *FORMAT* is confusingly named the same as the Currency
*datatype*; but the Format of a field does not affect what is stored
in the database, only how that value is displayed.

Currency has EXACTLY four, no more no fewer, decimal places.

When you're *calculating* a value to put into a currency field, use

Round(<your expression here>, 2)

to round the result to two decimal places.


John W. Vinson[MVP]
 

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