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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sum Trouble



 
 
Thread Tools Display Modes
  #1  
Old January 5th, 2010, 09:40 PM posted to microsoft.public.access.gettingstarted
HelpMePlease
external usenet poster
 
Posts: 27
Default Sum Trouble

I am trying to calculate information in my report for employee training. The
report is based on a query that askes for a date range. All training is
displayed for each employee within that range and if it was a mandatory
training outside of the range. The report needs to calculate the completion
hours ONLY if the training occurred during the date range and ignore the
mandatory trainings outside of that time.

Thanks


  #2  
Old January 6th, 2010, 12:03 AM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Sum Trouble

On Tue, 5 Jan 2010 13:40:01 -0800, helpmeplease
wrote:

I am trying to calculate information in my report for employee training. The
report is based on a query that askes for a date range. All training is
displayed for each employee within that range and if it was a mandatory
training outside of the range. The report needs to calculate the completion
hours ONLY if the training occurred during the date range and ignore the
mandatory trainings outside of that time.

Thanks


Correct the error in the query.

If you would like help doing so, please open the query in SQL view and post
the SQL text here. If the fieldnames aren't selfexplanatory please explain
them; it might also help to include some sample data and show what is being
included that you don't want included or vice versa.
--

John W. Vinson [MVP]
  #3  
Old January 6th, 2010, 12:37 AM posted to microsoft.public.access.gettingstarted
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Sum Trouble

You posed no question for someone to answer.

Post your table structure with field names and datatype. Post sample data.

--
Build a little, test a little.


"helpmeplease" wrote:

I am trying to calculate information in my report for employee training. The
report is based on a query that askes for a date range. All training is
displayed for each employee within that range and if it was a mandatory
training outside of the range. The report needs to calculate the completion
hours ONLY if the training occurred during the date range and ignore the
mandatory trainings outside of that time.

Thanks


  #4  
Old January 6th, 2010, 01:16 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default Sum Trouble

I would probably add a calculated field to the query to flag the hours or just
show the hours that should be totaled and then use that in the report to sum
the relevant records.

It would help give you a more definitive answer if you posted the SQL text of
the query you are using to generate the data for the report.

The calculated field could be
AddThis: IIF([TrainingDate] Between #2009-01-01# and
#2009-03-31#,[CompletionHours], Null)

You could use a similar expression in your report and not bother to create the
calculated field. In this case, I would guess that it will be easier to get
the start and end dates in the query.

If you are using parameter prompts in the query, the calculated field would
look like
AddThis: IIF([TrainingDate] Between [Start Date] and [End
Date],[CompletionHours], Null)


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

helpmeplease wrote:
I am trying to calculate information in my report for employee training. The
report is based on a query that askes for a date range. All training is
displayed for each employee within that range and if it was a mandatory
training outside of the range. The report needs to calculate the completion
hours ONLY if the training occurred during the date range and ignore the
mandatory trainings outside of that time.

Thanks


 




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 11:36 PM.


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