JC_Lives
asked on
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!!!
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!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That is not possible. A parameter can hold one value only.
/gustav
/gustav
JC_Lives,
the comment you accepted will NOT work in the access query builder
the comment you accepted will NOT work in the access query builder
ASKER
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... :(
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
open the table in design view,
see the Data Type of the field you are filtering
ASKER
Oh... shoot... for the record everyone, the solution was from capricorn1: criteria Not in (20,25). I'm sorry capricorn1... thanks for your help!!!!
JC_Lives,
click on the Request Attention above to reopen the Q
click on the Request Attention above to reopen the Q
Cap1,
Email the mods. They may swap the points.
Email the mods. They may swap the points.
ASKER
Thanks guys, requested attn. Will swap if possible.
ASKER
Thanks Capricorn1!!!!!! Sorry for the delay!!!!!!
!= "20" and != "25"
But unless you stored these numbers as text you shouldn't need the quotes.