error in formula in report

D

Donna

I get Error# when there is no amount for the TotalRequsition in the
following formula:
[StartingAccBalance]-[totalRequisitions]-[TotalPayroll]

Some accounts do not have reqs and others do not have payroll. However some
accounts have both. Any suggestions?

Thanks
 
R

RuralGuy

I get Error# when there is no amount for the TotalRequsition in the
following formula:
[StartingAccBalance]-[totalRequisitions]-[TotalPayroll]

Some accounts do not have reqs and others do not have payroll. However some
accounts have both. Any suggestions?

Thanks

Use the Nz() function.
Nz([StartingAccBalance],0)-Nz([totalRequisitions],0)-Nz([TotalPayroll],0)
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
D

Donna

Can you use this to reference a subreport?

Ex: =NZ([totalPayroll].Form!TotalPayroll,0)

Thanks....

Douglas J. Steele said:
[StartingAccBalance]-Nz([totalRequisitions],0)-Nz([TotalPayroll],0)



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Donna said:
I get Error# when there is no amount for the TotalRequsition in the
following formula:
[StartingAccBalance]-[totalRequisitions]-[TotalPayroll]

Some accounts do not have reqs and others do not have payroll. However
some
accounts have both. Any suggestions?

Thanks
 
D

Douglas J. Steele

You can't reference a subreport: you'd have to reference a control on the
subreport, but yes, you can do that.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Donna said:
Can you use this to reference a subreport?

Ex: =NZ([totalPayroll].Form!TotalPayroll,0)

Thanks....

Douglas J. Steele said:
[StartingAccBalance]-Nz([totalRequisitions],0)-Nz([TotalPayroll],0)



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Donna said:
I get Error# when there is no amount for the TotalRequsition in the
following formula:
[StartingAccBalance]-[totalRequisitions]-[TotalPayroll]

Some accounts do not have reqs and others do not have payroll. However
some
accounts have both. Any suggestions?

Thanks
 
Top