Query to show all records when a value in a record has been entered

C

Colin Weir

Hi there

I'm trying to do something I think would be simple however I am
toiling with it.

I have a database and I've created a query to get it to list all the
records of people's email address along with their names and also
whether they have been archived or not.

I would like it to only show the information where there is an email
address entered and not all the blank ones also.

Design view is set as follows

Forename
Surname
Archive: No
Archive Date: Is Null
email_address

I've tried using * and Is Not Null but I am still getting all the
records showing.

Thanks

Colin
 
A

Arvin Meyer [MVP]

For the address list you are looking for, use only the addresses, not every
field. Also use the DISTINCT keyword to eliminate duplicates:

SELECT DISTINCT tblMyData.EmailAddress
FROM tblMyData
WHERE (((tblMyData.EmailAddress) Is Not 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