Solved

multiplication calculation in report

Posted on 2012-03-26
5
368 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 34

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
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.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

717 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