expression

  • Thread starter Thread starter klp via AccessMonster.com
  • Start date Start date
K

klp via AccessMonster.com

I have a form for a rolling report. I need to add some criteria, and I was
doing so in the query end of it, that has the following:

ClassID = 12 or 14

This is all based on what Class they select from the form. Class ID 14 or
ClassID of 12.

If ClassID = 14, exclude all parts between "401 000" and "401 999"
That is only for ClassID or 14, ClassID or 12 needs to show all parts. Do I
continue in my query or do I need to do that behind my form? If so in my
query what's the best way? I have tried using several different operators,
Like, Between, <>, and nothing works. Any suggestions?

Thanks in advance!
 
Try this --
SELECT [TEST-Table].Parts, [TEST-Table].ClassID
FROM [TEST-Table]
WHERE ((([TEST-Table].Parts) Not Between "401 000" And "401 999") AND
(([TEST-Table].ClassID)="14")) OR ((([TEST-Table].ClassID)<>"14"));
 
Back
Top