How to query the blank date field?

  • Thread starter Thread starter hkgary33 via AccessMonster.com
  • Start date Start date
H

hkgary33 via AccessMonster.com

Dear all,
In my table named "tblFile", I have a field calls "HandlingDate", which
stores the date of handling of each file. However, if that particular file is
not yet handled, then the corresponding "HandlingDate" field will be leave
blank.
Now the problem is here: I would like to use a query to show all files that
the "HandlingDate" fields are blank. I've use the SQL statement SELECT *
FROM tblFile WHERE tblFile.HandlingDate = ""
But I can't get the result from the above query. So I would like to ask, if
the date field is leave blank, is it stores a empty string, or other thing?
How can I amend my query to correct it?
Thanks so much!!!!!

hkgary33
 
SELECT *
FROM tblFile
WHERE tblFile.HandlingDate is null ;

"Blanks" are usually nulls. Nulls mean that you don't know such as you don't
know the date in this field.

Sometimes you'll have empty strings and that what your = "" would find.
 
Rick said:
Try IsNull. Something like:


SELECT * FROM tblFile WHERE IsNull(HandlingDate)

I personally wouldn't invoke a VBA function if I didn't have to...

SELECT * FROM tblFile WHERE HandlingDate Is Null
 
Back
Top