exclude records

G

Guest

Good afternoon,

I'm trying to exclude results returned by a query. I have a field which
has the following values: Released, On hold, Maturity A, Maturity B and
Maturity C.

I wish to exclude all the records where the value = Maturity *. As such I
added 'Not Like "Maturity*"' as the criteria for this field. To my amazment,
instead of eliminating these records the query returns only those values.
For fun I removed the "Not" in the criteria and I get the exact same records
returned???

How can I exclude the "Maturity*" records? Why isn't my Not Like criteria
acceptable?

Thank you,

Daniel
 
J

John Vinson

Good afternoon,

I'm trying to exclude results returned by a query. I have a field which
has the following values: Released, On hold, Maturity A, Maturity B and
Maturity C.

I wish to exclude all the records where the value = Maturity *. As such I
added 'Not Like "Maturity*"' as the criteria for this field. To my amazment,
instead of eliminating these records the query returns only those values.
For fun I removed the "Not" in the criteria and I get the exact same records
returned???

How can I exclude the "Maturity*" records? Why isn't my Not Like criteria
acceptable?

It should be. There's evidently something else going on!

Could you open your Query in SQL view and post the entire SQL string
here?

John W. Vinson[MVP]
 
T

tiger0268 via AccessMonster.com

try:
Not Like "Maturity*"

If that don't work try
Not Like "Maturity" & "*"

If that don't work, you can always just eliminate each one individually:
Not "Maturity A" And Not "Maturity B"
 
J

John Vinson

try:
Not Like "Maturity*"

If that don't work try
Not Like "Maturity" & "*"

If that don't work, you can always just eliminate each one individually:
Not "Maturity A" And Not "Maturity B"

minor correction: The "Not" operator and the "is not equal" operator
<> are different. The last of these should be

<> "Maturity A" AND <> "Maturity B"

or, if you prefer,

NOT IN("Maturity A", "Maturity B")

John W. Vinson[MVP]
 

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