Solved

multiplication calculation in report

Posted on 2012-03-26
5
358 Views
Last Modified: 2012-03-26
I am attaching database- open database - and click button 'preview report'

Is there anyway I can force the 6 wk turn column to multiply the [avg wkly usage] field by 6 like a calculator would- I am getting a little different number than a calculator gets.
I had this problem in query-
example:
6.80 * 6 = 40.8 ( calculator) in report (40.79)
I don't remember having this discrepancy before- ( and It would be a large thing to have to change data types in the real database- which i tried in example and did not seem to matter)
thank you,
TestMultiply.accdb
0
Comment
Question by:davetough
5 Comments
 
LVL 31

Accepted Solution

by:
Helen_Feddema earned 400 total points
ID: 37766118
I suspect that the actual value in the table field (or the calculated weekly average) has a number of decimal points, and that may be affecting the calculation.  You could round the weekly average figure to avoid this problem, or round the final result.
0
 
LVL 33

Assisted Solution

by:Norie
Norie earned 50 total points
ID: 37766128
The value in Avg Weely Usage is actually 6.79886655.

6.79886655 * 6 = 40.7931993 (calculator)

So 40.79 is correct I suppose.

If you change the format of that field in the table/report so it displays more decimal places you'll see the value.
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 50 total points
ID: 37766691
<No Points wanted>

I'm with imnorie, ...

Access sometimes has issue with rounding...

To be sure, only perform rounding in your "Final" calculation.

The catch here is that if your "Source" values are rounded (or formatted) in the report, the "final" value may appear "off" slightly.

In the real world, mot people understand this if the difference is not "material"...
In your case the diff is (.01) one penny, ...generally not regarded as "Material"

So either you have Long "accuare" source data, and long accurate results,
...or you employ rounding/formatting and your data looks shorter, but you may have visble "Rounding" issues....

JeffCoachman
0
 

Author Closing Comment

by:davetough
ID: 37766756
thank you- did not realize number has alot of decimal points
0
 
LVL 30

Expert Comment

by:hnasr
ID: 37766768
Change format from double to currency.
Modify the values in the table. The report prints as expected.

This has to do with accuracy of saving numbers in memory.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question