Re: Annoying decimal point
From: John Nurick (j.mapSoN.nurick_at_dial.pipex.com)
Date: 03/16/04
- Next message: John Nurick: "Re: scripting in access"
- Previous message: John Nurick: "Re: From Access to Word"
- In reply to: Bruce: "Annoying decimal point"
- Next in thread: Bruce: "Re: Annoying decimal point"
- Reply: Bruce: "Re: Annoying decimal point"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Mar 2004 07:34:14 +0000
Hi Bruce,
Try using an expression in the textbox on the report, something along
the lines of
=IIF(Abs(X-Int(X))>=0.005,Format(X,"#.##"),Format(X,"#0"))
replacing X with [FieldName]
On Mon, 15 Mar 2004 12:35:58 -0800, "Bruce"
<anonymous@discussions.microsoft.com> wrote:
>I have a report containing a sum. Sometimes the sum is a
>whole number, sometimes it has one decimal place, and
>sometimes two. The number format #.## does what I want
>except that it keeps the decimal point for a whole number
>(i.e. 3.). Is there a way of supressing the decimal point
>if the result is a whole number? I can sort of imagine
>that an IIf statement could take care of it, but I'm not
>sure how to put that together or where to put it. A minor
>issue, but it keeps cropping up.
-- John Nurick [Microsoft Access MVP] Please respond in the newgroup and not by email.
- Next message: John Nurick: "Re: scripting in access"
- Previous message: John Nurick: "Re: From Access to Word"
- In reply to: Bruce: "Annoying decimal point"
- Next in thread: Bruce: "Re: Annoying decimal point"
- Reply: Bruce: "Re: Annoying decimal point"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|