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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|