search query, excluding fields

sambucaman

Registered User.
Local time
Yesterday, 21:02
Joined
May 6, 2010
Messages
41
Hi everyone.
I want to run a search of my table "customers", and search in the "town" field for a certain town, but only display results of customers with an email address.

Id normally do a search by the following
Code:
Like "*" & [Search customers by town] & "*"

So, is there a way to exclude entries that DONT have an email address in the "email" field. So in other words, list results of exeryone in xxxtown that has an email address (then I can add that report to by mail list etc)

Thanks for your help
 
in your query set the critiera to IS NOT NULL
 
Like this?

query1.jpg


Its still listing all the records that don't have an email address.
 
Have you create a query based on the table, if so then you can set the criteria in the query to IS NOT NULL as I have suggested. So the SQL would show this

WHERE (((tblLogon.EmailAddress) Is Not Null));
 
Hi trevor, thanks for your answers. Still cant get it working correctly, I'll keep trying though!
 
Have you created a query rather than look to use the table. The query you can set your criteria.
 

Users who are viewing this thread

Back
Top Bottom