IIf - Sum Problem

H

helpmeplease

I have an employee database which tracks training. I have a table with basic
employee information and a seperate table to hold all trainings with dates
completed, hours and if it was mandatory. They are linked by an employee id.

I want to write a sum for each employee that shows the total hours earned if
the completed date falls between the user entered start and end date of the
report. Some of the trainings show regardless of the date completed if they
are identified as a mandatory training. This is my thoughts on the IIf
statement but I am missing something.

=IIf([Completed] IS BETWEEN (([Forms!frmDateSelect!Start]) AND(
[Forms!frmDateSelect!End]))),(Sum([Hours])))
 
K

KARL DEWEY

Try this --

=Sum(IIf([Completed] IS BETWEEN CVDate([Forms!frmDateSelect!Start]) AND
CVDate([Forms!frmDateSelect!End]),[Hours], 0))
 

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


Top