Decimal places doesn't seem to work

  • Thread starter Thread starter Laurel
  • Start date Start date
L

Laurel

I have a report which displays some numbers. I choose "general number" as
the format, and "1" as the number of decimal places. But it displays up to
3 decimal places. Any suggestions?

TIA
LAS
 
Laurel said:
I have a report which displays some numbers. I choose "general number" as
the format, and "1" as the number of decimal places. But it displays up to
3 decimal places.

It sounds like your number is a text string or was
concatenated into a text string. Post the text box's
control source and explain the data type of the field(s).
 
The control source is "Principle1" (one of 5, actually, Principle1,
Principle2, etc.). It is a column in a table of type Number, Single,
nothing in "Format." It is loaded by the following bit of code.

!Principle2 = isng_Principle2 / (ii_Principle2Count)

The other variables are "single" and "integer".
 
Different Formats afford different property settings.

From the answer to Marsh's reply, it looks like your table(s) might be
un-normalized.
 
I see that Duane's suggestion got you past your immediate
problem. Personally, I would use a specific format such as
#,##0.0
but that's just because I can not remember what the named
formats really do.

As Duane also mentioned, it looks like you might have bigger
problems with the table having inter-related fields, which
would be a violation of The Rules of Relational Database
Normalization (google it).
 
I see that Duane's suggestion got you past your immediate
problem.  Personally, I would use a specific format such as
        #,##0.0
but that's just because I can not remember what the named
formats really do.

As Duane also mentioned, it looks like you might have bigger
problems with the table having inter-related fields, which
would be a violation of The Rules of Relational Database
Normalization (google it).
--
Marsh
MVP [MS Access]
The control source is "Principle1" (one of 5, actually, Principle1,
Principle2, etc.).  It is a column in a table of type Number, Single,
nothing in "Format."  It is loaded by the following bit of code.
          !Principle2 = isng_Principle2 / (ii_Principle2Count)
The other variables are "single" and "integer".
"Marshall Barton" wrote

It must NOT be a violation of The Rules of Relational Database
Normalization, it may be a bug in Access. In some cases Access doesn't
recognize type of calculated fields in query. Especially if you use Nz
function; in such case you wil not be able to get decimal places, even
if you use Val(Nz(..., 0))! Similar behaviour with Switch, etc.
Generally, it's one of too many Access' bugs. :-(
 
Back
Top