expression builder NOT

B

Baffled

I am trying to do a very simple "NOT" expression in a report and keep getting
syntax error.

First of all when you open the expression builder in a report, what are you
connecting at the bottom? How much bearing does this have on what I am
trying to do?

Second, and I know this should be very simple but what is correct formatting
for the "NOT" or "NOT LIKE" expression.

Contract No. Not "WS0*". Should Contract No. be in brackets? Is it
double or single quotes?

Also can I do two expressions because I want to eliminate more data from my
report. EX. Contract No. Not Like "WS0*" and Contract No. Not Like "WS9*"
 
J

John Spencer

Any time you have spaces or other special characters in an object name you
must enclose it in brackets.

[Contract No.] Not LIKE "WS0*" and [Contract no.] Not Like "WS9*"

Of course that could be shortened to
[Contract No.] Not LIKE "WS[09]*"

For not equal you can use <>



John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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