Whenever I click on an employee name, I need to have the running total Balance calculated only for the employee selected in the AnnualLeave subform of the Employee form, and not to all the other employee names as is the case now.
The formula I used to calculate the running balance is:
=DSum("Nz([CarriedOver], 0)+Nz([Earned], 0)-Nz([Used], 0)","[AnnualLeave]")
The formula I tried to use to restrict the running balance to the EmployeeName on the main form is:
=DSum("Nz([CarriedOver], 0)+Nz([Earned], 0)-Nz([Used], 0)","[AnnualLeave]","EmployeeName='George'")
But for some reason I'm getting a "#Error" message in the Balance column of the AnnualLeave subform.
Please help!
Thanks, Chris