A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

MS Access 2007 Query _ Report



 
 
Thread Tools Display Modes
  #1  
Old June 5th, 2010, 07:36 PM posted to microsoft.public.access
stonewall1974
external usenet poster
 
Posts: 1
Default MS Access 2007 Query _ Report

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.

--
stonewall1974
Ads
  #2  
Old June 5th, 2010, 08:29 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default MS Access 2007 Query _ Report

On Sat, 5 Jun 2010 11:36:22 -0700, stonewall1974
wrote:

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
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:41 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.