Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No results.

Status
Not open for further replies.

pmaxon

Programmer
Sep 25, 2003
68
US
I have a club database and I want to produce a report which contains only those who do not have email addresses. I can produce a report of those with email addresses by using <> &quot; &quot; on the email address field. But I get no results if I use = &quot; &quot; or = &quot;&quot; on the email address field. Any ideas?

TIA!
 
Hi

The EMail address may be null, try Null in the criteria
Or if you have a mixture of null and spaces for missing EMail addresses, make an additional column in your query:

X:Len(Trim(Nz(EMail,&quot;&quot;) & &quot;&quot;)) = 0

and a criteria of true on that column

In cas eyou do not already know, Null is a concept value which means &quot;value unknown&quot; effectively, but it is not equal space and not equal zero - it is a useful concept, but can sometimes cause unexpected results


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Your email address field may have a NULL value in it.

Try using:

email_addresses Is Not NULL

~Brian
 
bdreed35

I think that would give me those with email addresses. I am trying to get those without email address. So far no luck.
 
then do the opposite, just remove the NOT :

email_addresses IS NULL

~Brian
 
I have tried = NULL and receive no results.

PS - is = NULL different than = &quot;&quot;? They do both give the same results, which is NONE.
 
Did you try KenReay's solution above?

Yes, NULL is different than &quot;&quot; (empty string).

~Brian
 
HI

you could also try

X:Len(Trim(Nz(EMail,&quot;&quot;) & &quot;&quot;)) = 0

and a criteria of true on that column

and from first post &quot;In case you do not already know, Null is a concept value which means &quot;value unknown&quot; effectively, but it is not equal space and not equal zero - it is a useful concept, but can sometimes cause unexpected results&quot;


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Please bear with me here...

are you saying to add a new column &quot;x&quot; in my query and table and place the following criteria on it: Len(Trim(Nz(EMail,&quot;&quot;) & &quot;&quot;)) = 0 and if this value is true then it should be a valid &quot;no email address&quot;?
 
Hi

No, do not add a new column to the table.

In the query make a 'calculated' column (I have called it X, but any name you wish will do)

You do this by typing exactly what I showed you in the area of the query grid where you would normally drag a column name to so type:

X:Len(Trim(Nz(,&quot;&quot;) & &quot;&quot;)) = 0

replacing EMail with the name of your column which contains the EMail address

what this bit of code does is to return True if the EMail column is a Null or spaces

in the criteria space of this column put True to pick out those without an EMail address or false to piclout those with an EMail address

OK?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - [URL unfurl="true"]www.kenneth.reay.btinternet.co.uk[/URL]
UK
 
Sounds good KenReay -- I'll give it a try!

Thanks a bunch!
 
Hey KenReay - it worked flawlessly! Thank you so very much for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top