How to omit records that contain certain data (text)

  • Thread starter Thread starter Lovey
  • Start date Start date
L

Lovey

I have a large customer database. Within the database I have the following:

master customer list
customer review list
customer number list
a combined customer list & review list

Our goal is to create a report of that combines records in both the master
customer list and the customer review list, and then omit certain records
that contains the text "cash".

I am in way over my head here...any help would be most appreciated.
 
I have a large customer database. Within the database I have the following:

master customer list
customer review list
customer number list
a combined customer list & review list

Our goal is to create a report of that combines records in both the master
customer list and the customer review list, and then omit certain records
that contains the text "cash".

I am in way over my head here...any help would be most appreciated.

Create a query joining the master customer list to the customer review list
(presumably by a unique CustomerID, though you don't say and I can't see it
from here); on the Criteria line under the field in question put

NOT LIKE "*cash*"

Note that this will exclude records where the field contains cashews, or any
other string containing the letters "cash" embedded anywhere within the field.

I'm really queasy about the normalization of your tables if you have all these
different tables for what appears to be overlapping data!
 
I tried to do this:

shiptonam «Expr» Not «Expr» Like "*cash*"

but I get the following error:

the expression you entered contains invalid syntax. You may have entered an
operand without an operator.

So, I tried adding + and = in the mix a few ways, but no luck...I am
definately in over my head, and have no help on this here in the office...

Thank you for you assistance!
 
I tried to do this:

shiptonam «Expr» Not «Expr» Like "*cash*"

but I get the following error:

the expression you entered contains invalid syntax. You may have entered an
operand without an operator.

So, I tried adding + and = in the mix a few ways, but no luck...I am
definately in over my head, and have no help on this here in the office...

Where are you trying to do this!?

Don't use the expression builder at all.

Open the Query in design view.

In the Criteria box underneath the shiptonam field (if that's the field from
which you want to exclude "cash") type the exact literal text

NOT LIKE "*cash*"

Open the query window. Does it get your desired result?
 
why not <> "cash"?
John W. Vinson said:
Where are you trying to do this!?

Don't use the expression builder at all.

Open the Query in design view.

In the Criteria box underneath the shiptonam field (if that's the field
from
which you want to exclude "cash") type the exact literal text

NOT LIKE "*cash*"

Open the query window. Does it get your desired result?
 
why not <> "cash"?

It depends on what you mean by "contains".

<> "cash"

will exclude those records for which the field is exactly equal to the string
"cash".

NOT LIKE "*cash*"

will exclude those records where the field contains the string "cash" along
with any other contents - e.g. "this customer is to pay cash only", "cash and
carry", etc.
 

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