Query not filtering data

Hello,

Here is a screenshot of my query

http://www.mts.net/~and0215/QueryScreenshot2.jpg

it still displays the items that are suppose to be exclude ...why ?

any help is appreciated

thank you in advance.

It is not possible to tell from your screenshot what is not getting excluded properly or what should be included. :confused:

I don't think anyone will be able to help without more details.
 
Okay,

I have 2 tables

1 - tickets - is an MySQL tbl
2 - Departments - is an Access tbl

I am attempting to create a Pivot Table Report :eek: (yeah i know)

From my tickets tbl I select the following

Grp(dept), C29(subactivity), C30(Time spent on activity), Oper(Service rep Names)

Under Grp(dept) I would lile to exclude

Wireline. Internet ADSL, Internet Dialup, and Internet Wholesale


under C29(subactivity) i would like to excude

NCAMS and DATA

under C30(Time spent on activity) I would like to exclude

--Please Select--

also under C30(Time spent on activity) i would like to format as

Expr1: Format([C30],"Short Time") (this works currently)

and would like a SUM the total time ....for example

my Pivot Table should display as

Oper1 Oper2 Oper3 Grand Total
Dept1 00:15 00:15 00:15 00:45
Dept2 00:15 00:15 00:15 00:45
Dept3 00:15 00:15 00:15 00:45
Grand Total 00:45 00:45 00:45 02:15


I hope all that made sense :)
 
Last edited:
To do this it is better to switch to SQL view and write the Where Clause

Where Grp <> "wirline" or Grp <> etc or C29 <> "NCAMS" or

well you get the idea

If you look at the SQL generated from your code you ill see the difference.

Brian
 
It seems to me that the Departments have an ID number you can filter on instead. If you select tblDepartments.ID field instead and set that field's criteria to <4 and remove all the criteria in GRP, since it looks like the join line you have selected will render them redundant.

Now you have a simpler <> criteria for C29.

Where clause should now be: tbldepartments.ID <4 AND C29 <> "NCAMS" OR tbldepartments.ID<4 AND C29 <> "Data"
 
I should have asked if any of the conditions are dependent, IE is it <> wireline AND <>NCAMS or are all conditions stand alone, if the latter it is AND within fields and OR between in a <> scenario.

Just ignore my earlier post it was rubbish, I think.


Brian
 

Users who are viewing this thread

Back
Top Bottom