complex query

D

Dean

I have a query that brings up vaction days per shift, but each shift has a
different criteria for the depts that are queried. The way it works now you
have to enter date then the shift. In the design mode there is a field for
dept. I have it Not in('4','5','6','7') So it brings up the vacations for
everyone except those in these depts. What i want is if i put in 1st shift i
want the above mention depts left out. For 2 shift i just want 4,5,6 left
out for 3rd shift i just want 5 &6 left out. I put all that in my query but
it does not work. Any ideas?


thanks
 
M

Michel Walsh

Hi,



.... WHERE CHOOSE( shift,
fieldName NOT IN('4', '5', '6', '7') ,
fieldName NOT IN('4', '5', '6'),
fieldName NOT IN('5', '6') )



Hoping it may help,
Vanderghast, Access MVP
 
Top