Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#error DSum 1

Status
Not open for further replies.

vttech

Technical User
Jan 28, 2006
297
US
The Following statement below that I place in a text box control source works if their are values that meet the criteria.
But if no criteria are found I get an #error statement instead of 0. How can I resolve this issue??

Code:
=Format(DSum("(([logout]-[login])*24)","tblLogInOut","[activity]='work' and [employeeID]=reports!rptBiWeekly!txtEmployeeID "),"#.00")


Newbie in search of knowledge
 
Wrap the NZ function around your expression...

Code:
= Nz(Format(DSum("(([logout]-[login])*24)","tblLogInOut","[activity]='work' and [employeeID]=reports!rptBiWeekly!txtEmployeeID "),"#.00"), 0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top