I'm new to the forum and have limited Access experience.
I want to calculate the workload efficiency of staff in a blood center. Occassionally donors are registered before official office hours. I wrote an IIf expression to change the registration time (adding an hour) if the office is not open, otherwise display the registration time.
CorrectHr: IIf (IsNull([AvgStaffWorkHrs]),IIf([RegHour]>#11:00:00 AM#, DateAdd("h", -1,[RegHour]),DateAdd("h", +1, [RegHour])),[RegHour])
The expression returns the expected values. I then ran a second query to group by the "corrected" registration time so I could add the total number of registrations. Although the times appear the same, they are not being grouped together. What am I missing?
thanks
I want to calculate the workload efficiency of staff in a blood center. Occassionally donors are registered before official office hours. I wrote an IIf expression to change the registration time (adding an hour) if the office is not open, otherwise display the registration time.
CorrectHr: IIf (IsNull([AvgStaffWorkHrs]),IIf([RegHour]>#11:00:00 AM#, DateAdd("h", -1,[RegHour]),DateAdd("h", +1, [RegHour])),[RegHour])
The expression returns the expected values. I then ran a second query to group by the "corrected" registration time so I could add the total number of registrations. Although the times appear the same, they are not being grouped together. What am I missing?
thanks