How to query the blank date field?

  • Thread starter hkgary33 via AccessMonster.com
  • 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
 
G

Guest

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.
 
R

Rick Brandt

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
 
R

Rick B

Good point!


--
Rick B



Rick Brandt said:
I personally wouldn't invoke a VBA function if I didn't have to...

SELECT * FROM tblFile WHERE HandlingDate Is Null
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top