I need a query that should filter null records in text field. If I set IsNull criteria, it is returning 0 records. If Not IsNull is set, it returns only records with data in the field - as it should.
I have checked if the value of empty field is null by opening recordset and trying to present the value in msgbox. If the value has text, the msgbox shows it, if it does not, the msgbox declares Null value error message. Therefore, I guess empty fields are having null value.
Now, why IsNull is not working?
This should return records with empty fields for [e-mail] and it does not!
This works perfectly!
I have checked if the value of empty field is null by opening recordset and trying to present the value in msgbox. If the value has text, the msgbox shows it, if it does not, the msgbox declares Null value error message. Therefore, I guess empty fields are having null value.
Now, why IsNull is not working?
This should return records with empty fields for [e-mail] and it does not!
Code:
SELECT Klijenti.[e-mail]
FROM Klijenti
WHERE (((Klijenti.[e-mail])=IsNull([e-mail])))
ORDER BY Klijenti.[e-mail];
This works perfectly!
Code:
SELECT Klijenti.[e-mail]
FROM Klijenti
WHERE ((Not (Klijenti.[e-mail])=IsNull([e-mail])))
ORDER BY Klijenti.[e-mail];