Looking for date field that is empty

  • Thread starter Thread starter Aurora
  • Start date Start date
A

Aurora

I am using Access 2003.
I have a query in which I want to search for records that include a date
field that is empty. I tried - isnull - but that did not work. I must be
having a senior moment because for the life of me I can not think of how to
search for records where the date field is empty. I am sure I have done this
before but ....
Can anyone help me?

Thank you - aurora
 
Aurora

Open a query in design view. Add the table and the date field (plus any
others you want to see).

In the Selection Criterion under the date field, put:
Is Null

(or just type "Null"... Access will modify it to "Is Null").

Note: if this doesn't return any records, perhaps you don't have "Nulls" in
the field, but "zero-length strings"...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
If this is truly a date/time data type, try set the criteria in your query to:
Is Null
 
Aurora said:
I am using Access 2003.
I have a query in which I want to search for records that include a date
field that is empty. I tried - isnull - but that did not work.


The criteria for that is:

Is Null

IsNull is the name of a VBA function that would be used in a
different way that is not needed/appropriate in a query.
 
I am trying to strip out any email addresses that are null. I've tried is
not null and the query returns all the records with and without email
address. How do I only get the records that have email addresses?

Thanks for your help.

Susan
 
You may have spaces or zero-length-strings in your email address field. Try
create a new column in your query like:
TrimEmail: Len(Trim([EmailField] & ""))
set the criteria under this column to
 
Hi Duane:

By God that worked. Thank you so much!!

Susan

Duane Hookom said:
You may have spaces or zero-length-strings in your email address field. Try
create a new column in your query like:
TrimEmail: Len(Trim([EmailField] & ""))
set the criteria under this column to

--
Duane Hookom
Microsoft Access MVP


Susan May said:
I am trying to strip out any email addresses that are null. I've tried is
not null and the query returns all the records with and without email
address. How do I only get the records that have email addresses?

Thanks for your help.

Susan
 
Don't act so surprised ;-)
--
Duane Hookom
Microsoft Access MVP


Susan May said:
Hi Duane:

By God that worked. Thank you so much!!

Susan

Duane Hookom said:
You may have spaces or zero-length-strings in your email address field. Try
create a new column in your query like:
TrimEmail: Len(Trim([EmailField] & ""))
set the criteria under this column to

--
Duane Hookom
Microsoft Access MVP


Susan May said:
I am trying to strip out any email addresses that are null. I've tried is
not null and the query returns all the records with and without email
address. How do I only get the records that have email addresses?

Thanks for your help.

Susan

:

Aurora wrote:

I am using Access 2003.
I have a query in which I want to search for records that include a date
field that is empty. I tried - isnull - but that did not work.


The criteria for that is:

Is Null

IsNull is the name of a VBA function that would be used in a
different way that is not needed/appropriate in a query.
 

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

Back
Top