How do I query for blank date

G

Guest

I'm doing a query and I want to filter for blank dates. Every program seems
different. It appears for a text field " " works. In another program I use
they use the date of `01/01/1900` as the blank date. How would it be
recognized in Access.
 
G

Guest

in Access, blanks are called Nulls, and they are different than empty
strings. You can query records with blank (Null) entries for any type of
field by typing "Is Null" (without the quotes) on the criteria line of any
field.

HTH, Ted Allen
 
M

MGFoster

Blank said:
I'm doing a query and I want to filter for blank dates. Every program seems
different. It appears for a text field " " works. In another program I use
they use the date of `01/01/1900` as the blank date. How would it be
recognized in Access.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Normal practice is to use NULL if there isn't any data in the column's
cell. To test for NULLs:

WHERE column_name IS NULL

or - is there something there?

WHERE column_name IS NOT NULL

I've noticed that creating a table in Access 2000, and higher versions,
that Text data types have the Allow Zero Length Strings property
defaulting to Yes! If you want to use NULLs in your Text columns change
that to No.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQi4ZbIechKqOuFEgEQKC6wCgmHqg4W9gTmiO3zdZxpsqBax8UYUAn0jp
d4CilKhc1Un1F/4Hiul6kAHE
=4l7a
-----END PGP SIGNATURE-----
 
S

Steve Schapel

Agreed. With a minor correction... the Allow Zero Length property
defaulting to Yes was an innovation with Access 2002. Access 2000
defaults to No. And yes, just one of those little jobs you have to get
in the habit of when making a table, is to go through and correct the
default settings, and having to put the Allow Zero Length back to No for
text fields is an irritation.
 

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