Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Data conversion to currency problem

0 views
Skip to first unread message

Brent Bigler

unread,
Sep 18, 1997, 3:00:00 AM9/18/97
to

Try this:

NewValue = CInt(OldValue*10)/100

or, for bigger numbers:

NewValue = CLng(OldValue*10)/100

This should round the number before getting rid of the decimal.

Br...@Bigler.com

Jerry Guzi Consulting wrote in article <34200334...@pcform.com>...

>In Access 2.0, I have imported a comma-delimited file into a new table.
>This table contains part numbers and prices. The prices have 3 decimal
>places (x.xxx). I have tried changing the data type to Currency. The
>prices show up with 2 decimal places, but when I use the prices in
>calculations, it uses the original 3 decimal number.
>As an example, one of the parts has a price of $10.825. As currency, it
>shows as $10.83 (which is the price that I want to use). So, the
>calculation (30*10.83) should come out as 324.90. The result that I get
>is 324.75 which is (30*10.825).
>I have tried copying this data into new fields, changing the decimal
>place setting from AUTO to 2, and using the CCur function with no change
>in results.
>Does anyone know of a function, expression, etc. that would round the
>price to 2 decimals and then proceed with the rest of the equation?
>
>Any help would be greatly appreciated,
>Mark R. Mayberry
>
>

0 new messages