[RESOLVED] Access 2003 - Calculations In A Report
Hi All,
I am trying to create a field which will display how much an employee has been paid by using the "hours worked" * "payrate" fields.
Using the code below returns "#Error" in the report.
Code:
=CCur([PayRate] * [Hours Worked])
The DataType For PayRate Is "Currency" and Hours worked is "Number". I would also like to create a total field for employee payments made but using the below code returns "#Error"
Re: Access 2003 - Calculations In A Report
If [PayRate] is Null or [Hours Worked] is Null then [PayRate] * [Hours Worked] is Null and CCur(Null) gives an #Error. Change it to:
Code:
=CCur(Nz([PayRate],0) * Nz([Hours Worked],0))
Re: Access 2003 - Calculations In A Report
Cheers anhn for the suggestion. I took a different approach and used the summing function in my SQL query :D As for the total's, I was placing them in the wrong area of the report design :cry: