Null NZ IIF

MM-UK

Registered User.
Local time
Today, 23:25
Joined
Jun 24, 2003
Messages
10
I need the following to handle Nulls but not sure which option to use.

=(DSum("TG","tblLabourBooking","AssessmentNo=" & [AssessmentNo] & " And Operation='Fit'"))

Thanks in advance

MM
 
How about:
=(DSum("TG","tblLabourBooking","AssessmentNo=" & [AssessmentNo] & " And Operation='Fit' AND TG IS NOT NULL"))
Or whatever you want to check for null
 
Sorry, that didn't work.
Does any body else have any idea's ?
 
Perhaps I should have mentioned, this is a text on a form as opposed to a criteria in a query.
 
OK how about:
=ISNULL(DSum("TG","tblLabourBooking","AssessmentNo=" & [AssessmentNo] & " And Operation='Fit'"),"DANG THING WAS NULL")
if your DSum returns NULL, you would get DANG THING WAS NULL instead.
 
DSum accounts for NULL values already (doesn't it? - Does in my tests)

Or are you trying to allow for [AssessmentNo] being Null?

What error are you getting?
 
In the field in question, I am getting #Name?

I've checked the field names are correct in the table, here's what should happen.

=(DSum("TG","tblLabourBooking","AssessmentNo=" & [AssessmentNo] & " And Operation='Fit'"))

The expression looks for TG which is a numerical value assigned earlier in the database.
If there is no data, I would like toi return a zero instead of #Name?

I have about 6 fields with this expression and only the "Fit" changes in each.
Where there is data, the expression works fine.
Its only where there is no data for that record.
 

Users who are viewing this thread

Back
Top Bottom