Access 2007 query - "criteria" syntax

Hi,

I have a query that I'd like to display only certain records. Instead of filtering every time my query runs, I'd like to type something like this into the "criteria" box: <> "20" and <> "25"

But this is giving me a syntax error. Any thoughts??

Thanks!!!
JC_LivesAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
if the field type is number, you don't need the "

<> 20 and <> 25

or you can  use

Not in(20,25)
0
 
SteveCommented:
Try using
 != "20" and != "25"

But unless you stored these numbers as text you shouldn't need the quotes.
0
 
Gustav BrockCIOCommented:
That is not possible. A parameter can hold one value only.

/gustav
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Rey Obrero (Capricorn1)Commented:
JC_Lives,

the comment you accepted will NOT work in the access query builder

0
 
JC_LivesAuthor Commented:
Well, it worked when i typed Not in(20,25) in the criteria section... but your solution gave me the same error that I had before... I'm kindof confused why your solution doesn't work... maybe I have a mix between numbers and text? I don't know how to check that... :(
0
 
Rey Obrero (Capricorn1)Commented:
the criteria Not in(20,25) was from my post Not the one you accepted.

open the table in design view,
see the Data Type of the field you are filtering
0
 
JC_LivesAuthor Commented:
Oh... shoot... for the record everyone, the solution was from capricorn1: criteria Not in (20,25). I'm sorry capricorn1... thanks for your help!!!!
0
 
Rey Obrero (Capricorn1)Commented:
JC_Lives,
click on the Request Attention above to reopen the Q
0
 
SteveCommented:
Cap1,
 Email the mods. They may swap the points.
0
 
JC_LivesAuthor Commented:
Thanks guys, requested attn. Will swap if possible.
0
 
JC_LivesAuthor Commented:
Thanks Capricorn1!!!!!! Sorry for the delay!!!!!!
0
All Courses

From novice to tech pro — start learning today.