|
|
| Next: Form Auto Fill |
| Author |
Message |
Laurel External

Since: Apr 02, 2004 Posts: 217
|
Posted: Fri Sep 18, 2009 9:09 pm Post subject: Decimal places doesn't seem to work Archived from groups: microsoft>public>access>reports (more info?) |
|
|
|
| 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
|
|
|
| Back to top |
|
 |
Duane Hookom External

Since: Feb 07, 2005 Posts: 1359
|
Posted: Fri Sep 18, 2009 9:59 pm Post subject: RE: Decimal places doesn't seem to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
What happens if you change the Format to Standard?
--
Duane Hookom
Microsoft Access MVP
"Laurel" wrote:
> 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
>
>
> |
|
| Back to top |
|
 |
Marshall Barton External

Since: Dec 07, 2003 Posts: 5120
|
Posted: Sat Sep 19, 2009 9:30 am Post subject: Re: Decimal places doesn't seem to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Laurel wrote:
>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).
--
Marsh
MVP [MS Access] |
|
| Back to top |
|
 |
Laurel External

Since: Apr 02, 2004 Posts: 217
|
Posted: Sat Sep 19, 2009 10:39 am Post subject: Re: Decimal places doesn't seem to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
That seems to work fine. How come?
"Duane Hookom" <duanehookom.DeleteThis@NO_SPAMhotmail.com> wrote in message
news:E3901B84-BE24-4115-878B-359CBF6CF08F@microsoft.com...
> What happens if you change the Format to Standard?
>
> --
> Duane Hookom
> Microsoft Access MVP
>
>
> "Laurel" wrote:
>
>> 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
>>
>>
>> |
|
| Back to top |
|
 |
Duane Hookom External

Since: Feb 07, 2005 Posts: 1359
|
Posted: Sat Sep 19, 2009 10:39 am Post subject: Re: Decimal places doesn't seem to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Different Formats afford different property settings.
From the answer to Marsh's reply, it looks like your table(s) might be
un-normalized.
--
Duane Hookom
Microsoft Access MVP
"Laurel" wrote:
> That seems to work fine. How come?
>
> "Duane Hookom" <duanehookom RemoveThis @NO_SPAMhotmail.com> wrote in message
> news:E3901B84-BE24-4115-878B-359CBF6CF08F@microsoft.com...
> > What happens if you change the Format to Standard?
> >
> > --
> > Duane Hookom
> > Microsoft Access MVP
> >
> >
> > "Laurel" wrote:
> >
> >> 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
> >>
> >>
> >>
>
>
> |
|
| Back to top |
|
 |
Laurel External

Since: Apr 02, 2004 Posts: 217
|
Posted: Sat Sep 19, 2009 10:45 am Post subject: Re: Decimal places doesn't seem to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
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" <marshbarton.RemoveThis@wowway.com> wrote in message
news:ckq9b5pi9r3tkkjoj7pscqtmukpm746idb@4ax.com...
> Laurel wrote:
>
>>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).
>
> --
> Marsh
> MVP [MS Access] |
|
| Back to top |
|
 |
Marshall Barton External

Since: Dec 07, 2003 Posts: 5120
|
Posted: Sat Sep 19, 2009 1:34 pm Post subject: Re: Decimal places doesn't seem to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
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]
Laurel wrote:
>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
>> Laurel wrote:
>>
>>>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). |
|
| Back to top |
|
 |
Vladimír_Cvajniga External

Since: Feb 01, 2007 Posts: 223
|
Posted: Sat Oct 31, 2009 8:50 am Post subject: Re: Decimal places doesn't seem to work [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On 19 zář, 19:34, Marshall Barton <marshbar... DeleteThis @wowway.com> wrote:
> 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]
>
> Laurel wrote:
> >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
> >> Laurel wrote:
>
> >>>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).
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 to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
| |
|
|