Excluding empty fields

E

emc

I would like to run a query by excluding the fields that have no data. There
are three fields Email, Email2 and Email3. Some people have none, one, two
or three email address. How can I run a query to show only the people who
have email address and exclude the ones who have nothing at all?

Any help is greatly appreciated.

emc
 
J

Jeanette Cunningham

emc,
you can create a calculated field in the query that concatenates the 3 email
addresses into one field and find out where the 3 addresses combined is an
empty string.

In a new column in the query type the following in the Field row
Expr1: Len([email1] & [email2] & [email3])

In the criteria row for this column type

Run the query and records with no emails at all are excluded.


Jeanette Cunningham
 
E

emc

Jeanette,

This has worked a treat. Many thanks.

One thing I have noticed is that in the Expr1 field there are numbers. Do
you know what they are?

emc

Jeanette Cunningham said:
emc,
you can create a calculated field in the query that concatenates the 3 email
addresses into one field and find out where the 3 addresses combined is an
empty string.

In a new column in the query type the following in the Field row
Expr1: Len([email1] & [email2] & [email3])

In the criteria row for this column type

Run the query and records with no emails at all are excluded.


Jeanette Cunningham


emc said:
I would like to run a query by excluding the fields that have no data.
There
are three fields Email, Email2 and Email3. Some people have none, one,
two
or three email address. How can I run a query to show only the people who
have email address and exclude the ones who have nothing at all?

Any help is greatly appreciated.

emc
 
J

Jeanette Cunningham

emc,
the numbers come from the Len part of expr1
Len is a function that counts how many characters in a string and shows the
count as a number.


Jeanette Cunningham


emc said:
Jeanette,

This has worked a treat. Many thanks.

One thing I have noticed is that in the Expr1 field there are numbers. Do
you know what they are?

emc

Jeanette Cunningham said:
emc,
you can create a calculated field in the query that concatenates the 3
email
addresses into one field and find out where the 3 addresses combined is
an
empty string.

In a new column in the query type the following in the Field row
Expr1: Len([email1] & [email2] & [email3])

In the criteria row for this column type

Run the query and records with no emails at all are excluded.


Jeanette Cunningham


emc said:
I would like to run a query by excluding the fields that have no data.
There
are three fields Email, Email2 and Email3. Some people have none, one,
two
or three email address. How can I run a query to show only the people
who
have email address and exclude the ones who have nothing at all?

Any help is greatly appreciated.

emc
 
E

emc

Thank you.

Jeanette Cunningham said:
emc,
the numbers come from the Len part of expr1
Len is a function that counts how many characters in a string and shows the
count as a number.


Jeanette Cunningham


emc said:
Jeanette,

This has worked a treat. Many thanks.

One thing I have noticed is that in the Expr1 field there are numbers. Do
you know what they are?

emc

Jeanette Cunningham said:
emc,
you can create a calculated field in the query that concatenates the 3
email
addresses into one field and find out where the 3 addresses combined is
an
empty string.

In a new column in the query type the following in the Field row
Expr1: Len([email1] & [email2] & [email3])

In the criteria row for this column type
0

Run the query and records with no emails at all are excluded.


Jeanette Cunningham


I would like to run a query by excluding the fields that have no data.
There
are three fields Email, Email2 and Email3. Some people have none, one,
two
or three email address. How can I run a query to show only the people
who
have email address and exclude the ones who have nothing at all?

Any help is greatly appreciated.

emc
 

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