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

Decimal Places

0 views
Skip to first unread message

GregInOz

unread,
Apr 22, 2006, 8:54:01 PM4/22/06
to
This may sound silly, but how can force a currency field to be only 2 decimal
places?

I've set the decimal places to 2 in the properties box, but i still get a
result of
$0.004

The field "balance" shows $0.00 but when i click on the field it shows the
above amount.


Duane Hookom

unread,
Apr 22, 2006, 10:24:04 PM4/22/06
to
You could try to use a decimal type field with 2 decimal places. Setting a
property to "display" only 2 decimal places doesn't force a field to store
only 2 decimal places.
--
Duane Hookom
MS Access MVP

"GregInOz" <Greg...@discussions.microsoft.com> wrote in message
news:B4DEE584-8A31-4BF0...@microsoft.com...

GregInOz

unread,
Apr 23, 2006, 2:28:01 AM4/23/06
to
Hi Duane,

I've tried each of the different formats, but they all give the same answer
0.004, i just thought there maybe some way to ensure the field is strictly 2
decimal places not just in display.

I have a checkbox "paid" which via an event is made True if the the
"balance" field is equal to 0, however of course the event won't fire if we
have a balance of $0.004, even if the display shows $0.00

Greg

Greg

Duane Hookom

unread,
Apr 23, 2006, 12:02:44 PM4/23/06
to
I didn't suggest you change anything regarding "different formats". My
suggestion was to go to the table design and change the field data type to
Decimal with 2 decimal places which is set using the Scale property.

--
Duane Hookom
MS Access MVP

"GregInOz" <Greg...@discussions.microsoft.com> wrote in message

news:8C2C2836-5088-454A...@microsoft.com...

oldmdb

unread,
Apr 23, 2006, 3:31:39 PM4/23/06
to
Assuming the 2 fields were 'Invoice' and 'Payment', you can try this for the
'Balance' field
(Int([Invoice]*100)-(Int([Payment]]*100))/100

This gets rid of the 3rd decimal place (.004) in the equation.

GregInOz

unread,
Apr 24, 2006, 11:00:01 PM4/24/06
to
Duane,

Sorry i misunderstood you instruction.

I did as instructed below, but no change.

Greg.

Duane Hookom

unread,
Apr 24, 2006, 11:50:51 PM4/24/06
to
Are you referencing a value stored in a table in a field with the type
Decimal and Scale of 2? Or, are you referring to a calculation in a query?

--
Duane Hookom
MS Access MVP

"GregInOz" <Greg...@discussions.microsoft.com> wrote in message

news:B4435CF2-51A1-47F2...@microsoft.com...

GregInOz

unread,
Apr 25, 2006, 5:11:01 AM4/25/06
to
I changed balance field in the table to Decimal and Scale of 2.

It's actually a calculation field on the form itself.

Greg.

Duane Hookom

unread,
Apr 25, 2006, 8:24:07 AM4/25/06
to
If it's a calculation then it's not a stored value in a field. Changing
field properties won't do you any good if this value is a product or sum or
whatever.

Calculations can't be modified by the users so why allow users to "click on
the field"? I suppose you can multiple by 100 then integer divide by 100.
=([YourExpression] * 100) \ 100


--
Duane Hookom
MS Access MVP

"GregInOz" <Greg...@discussions.microsoft.com> wrote in message

news:6D24FE47-5226-48D8...@microsoft.com...

GregInOz

unread,
Apr 26, 2006, 7:26:01 AM4/26/06
to
It's been a learning exerience and thanks for your input. Changing the data
type to Decimal & Scale to 2 is something will be able to use in the future.

I ended up using the the post from Oldmdb below.

Thanks again

Greg.

oldmdb via AccessMonster.com

unread,
Apr 26, 2006, 9:26:16 PM4/26/06
to
Glad to be of help

GregInOz wrote:
>It's been a learning exerience and thanks for your input. Changing the data
>type to Decimal & Scale to 2 is something will be able to use in the future.
>
>I ended up using the the post from Oldmdb below.
>
>Thanks again
>
>Greg.
>

>> If it's a calculation then it's not a stored value in a field. Changing
>> field properties won't do you any good if this value is a product or sum or

>[quoted text clipped - 69 lines]
>> >> >> >> > the
>> >> >> >> > above amount.

--
Message posted via http://www.accessmonster.com

diana

unread,
Sep 23, 2008, 11:38:26 AM9/23/08
to

I'm trying to enter numbers without putting in a decimal - i.e, in 2003
excell, 2310 would show as 23.10, but without my putting in a decimal. any
suggestions?
0 new messages