expression builder NOT

  • Thread starter Thread starter Baffled
  • Start date Start date
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*"
 
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
 
Back
Top