Solved

multiplication calculation in report

Posted on 2012-03-26
5
327 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now