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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SteveCommented:
Try using
 != "20" and != "25"

But unless you stored these numbers as text you shouldn't need the quotes.
0
Rey Obrero (Capricorn1)Commented:
if the field type is number, you don't need the "

<> 20 and <> 25

or you can  use

Not in(20,25)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gustav BrockCIOCommented:
That is not possible. A parameter can hold one value only.

/gustav
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.