Decimals on a Report

durdle

Registered User.
Local time
Today, 06:00
Joined
May 7, 2002
Messages
130
Hey everyone,

I have a report created and when I preview it, decimals are showing. I only want whole numbers, so I changed the Decimals to 0 in the properities, but still the decimals are showing in the report.

Any help would be great.

Thanks
________
manufacturing co. spartanburg
 
Last edited:
On the report, change the text box's Format property to Fixed. That, along with setting the DecimalPlaces property to 0, will suppress the decimal point and everything to the right of it - setting only one of these properties is not sufficient.
 
Hi AlanS,
Thanks for your response but I changed my Format to "Fixed" and Decimal Places to "0" and I get whole number but it should be larger then what is showing. For example in my first textbox is shows 2 and it should be 178. In the second textbox is should be 111 but it shows 1.
Any idea why this might happen.
I have attached the report to see if you understand what I am refering to.


Thanks
Chris
________
hawaii dispensaries
 

Attachments

Last edited:
I took a quick look, and my guess is that the problem may be due to the fact that some of your controls have names consisting entirely of digits. When you refer to those controls in the ControlSource property of other controls, Access may be interpreting the string of digits as a numeric constant rather than a reference to a control by that name. Try changing your control names (and all references to them) so that they start with a letter (and do not duplicate any names used by Access), and see if that doesn't fix it. Also, you have a control named Date, which is likely to be misinterpreted as a reference to the intrinsic Date() function; you might want to change that to txtDate.
 
You should do the roundings in your query, otherwise changing the format in the report will throw your totals out in the report due to rounding errors.

I can't get the underlying query to return results more than 10, so why you think the results should be over 100, I don't know. I don't understand what your Average calc field is doing. Perhaps the problem is here.

I don't think using numbers for your field descriptors is causing the problem, but it does make it difficult to understand.
 
Thanks you everyone for your help.
Neileg,
You were correct regarding the Average Calc, that was the problem. I have it fixed now.
You said in the post that I should do the roundings in the query. I was wondering how I would do that?
Or did you mean to make the changes in the table(s), to have the correct amount of decimals?

Chris
________
honda ct90
 
Last edited:
You have in your query

Average: Avg((([tblstats]![acd_calls]+[tblstats]![abn_calls])/5))

OK, you're probably changing this, but you apply rounding like this

Average: Round(Avg((([tblstats]![acd_calls]+[tblstats]![abn_calls])/5)),0)

Change the ,0 to whatever number of digits you need.

If you do your rounding, or formatting in the report, you will be rounding your totals after they have been calculated. So .3+.3+.3=.9 will display as 0+0+0=1
 

Users who are viewing this thread

Back
Top Bottom