MS Access 2007 Query _ Report

S

stonewall1974

I have a table that consists of a field named Minutes, multiple entries for a
specific individual may occur for any given day. I am placing a calculation
in a query that will break the minutes into 15 increments by using the
formula [Minutes]/15. The result value is coming up in correct when the units
are rounded; however, some values are rounded up. Example follows:

Minutes for a specific record; 5, 90, 50 for the same day = .333, 6, 3.333
respectively.

In the report the total = 9.667, which should reflect 9 only; in the report
it rounded to 10

The next record reflect
Minutes for a specific record;45, 70, 50, 15 for the same day = 3.000,
4.667, 3.333, 1 respectively.

In the report the total = 12, which is correct as 4.667 + 3.333 = 1.

What is the best way to handle this so that total minutes are calculated and
reflected correctly? I did try changing the properties, it did not work.
 
J

John W. Vinson

I have a table that consists of a field named Minutes, multiple entries for a
specific individual may occur for any given day. I am placing a calculation
in a query that will break the minutes into 15 increments by using the
formula [Minutes]/15. The result value is coming up in correct when the units
are rounded; however, some values are rounded up. Example follows:

Minutes for a specific record; 5, 90, 50 for the same day = .333, 6, 3.333
respectively.

In the report the total = 9.667, which should reflect 9 only; in the report
it rounded to 10

The term "Rounded" does in fact MEAN rounded to the *nearest* value; if you
want 9.667 to become 9.000, then you're truncating, not rounding. Would you
want 9.99999985 to become 9, or 10?

To truncate use the Integer Divide operator instead of dividing and then
getting a fraction - that is, [Minutes] \ 15. The backslash will return:

30\15 = 2
31\15 = 2
44\15 = 2
45\15 = 3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Rounding up numbers produced by a query 2
Query or report 5
Calculate time 1
Access 2010 Report Button 0
Pick list for report 2
Summing rounded numbers 1
Query Help...PLEASE!!! 1
Query Problem 1

Top