J
Jean-Francois Gauthier
I'm on a vista computer, using office xp, 2mg of RAM, 2.0ghz dual core
processor.
Would you be able to look at the following query and if possible suggest any
reasons why I am getting an error message "Query too Complex" when trying to
run it. I've tried base-ing the query on a table, and then based it on a
query of that table, including only the fields I wanted. I've shorten the
names of my fields, removed symbols like # that could give me trouble and
still to no avail. I read the article on Microsoft regarding this problem
and thsi is where I thought about these things. Now I have 6 fields that I
am trying to query into from a form, so I don't know if that is too much for
access to handle. I actually started out with 8 fields or 256 lines of
criterias, but brought it down to 6 as I know that this can and has been done
before. Yet I am still not able to run my query. I hope you are able to
help!
Here is my SQL of my query:
PARAMETERS [forms]![reportselection]![from] DateTime,
[forms]![reportselection]![dateto] DateTime,
[forms]![reportselection]![track] Text ( 255 ),
[forms]![reportselection]![client] Text ( 255 ),
[forms]![reportselection]![doctype] Text ( 255 ),
[forms]![reportselection]![po] Text ( 255 ), [forms]![reportselection]![fc]
Value;
SELECT tbl.Rec, tbl.Dept, tbl.Track, tbl.Client, doc.Doc, tbl.Ref, tbl.PO,
tbl.FC, tbl.Bun, tbl.Pro, tbl.Paid, tbl.Com
FROM tbl RIGHT JOIN doc ON tbl.Doc = doc.DocID
GROUP BY tbl.Rec, tbl.Dept, tbl.Track, tbl.Client, doc.Doc, tbl.Ref, tbl.PO,
tbl.FC, tbl.Bun, tbl.Pro, tbl.Paid, tbl.Com
HAVING (((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
((([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
((([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
..................(((tbl.Rec) Between [forms]![reportselection]![from] And
[forms]![reportselection]![dateto]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND ((doc.Doc) Like "*" &
[forms]![reportselection]![doctype] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Rec) Between
[forms]![reportselection]![from] And [forms]![reportselection]![dateto]) AND
((tbl.Client) Like "*" & [forms]![reportselection]![client] & "*") AND
((doc.Doc) Like "*" & [forms]![reportselection]![doctype] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![track]) Is Null))
ORDER BY tbl.Rec, tbl.Dept, tbl.Client, doc.Doc, tbl.FC;
Thanks for your help! It is very much appreciated.
processor.
Would you be able to look at the following query and if possible suggest any
reasons why I am getting an error message "Query too Complex" when trying to
run it. I've tried base-ing the query on a table, and then based it on a
query of that table, including only the fields I wanted. I've shorten the
names of my fields, removed symbols like # that could give me trouble and
still to no avail. I read the article on Microsoft regarding this problem
and thsi is where I thought about these things. Now I have 6 fields that I
am trying to query into from a form, so I don't know if that is too much for
access to handle. I actually started out with 8 fields or 256 lines of
criterias, but brought it down to 6 as I know that this can and has been done
before. Yet I am still not able to run my query. I hope you are able to
help!
Here is my SQL of my query:
PARAMETERS [forms]![reportselection]![from] DateTime,
[forms]![reportselection]![dateto] DateTime,
[forms]![reportselection]![track] Text ( 255 ),
[forms]![reportselection]![client] Text ( 255 ),
[forms]![reportselection]![doctype] Text ( 255 ),
[forms]![reportselection]![po] Text ( 255 ), [forms]![reportselection]![fc]
Value;
SELECT tbl.Rec, tbl.Dept, tbl.Track, tbl.Client, doc.Doc, tbl.Ref, tbl.PO,
tbl.FC, tbl.Bun, tbl.Pro, tbl.Paid, tbl.Com
FROM tbl RIGHT JOIN doc ON tbl.Doc = doc.DocID
GROUP BY tbl.Rec, tbl.Dept, tbl.Track, tbl.Client, doc.Doc, tbl.Ref, tbl.PO,
tbl.FC, tbl.Bun, tbl.Pro, tbl.Paid, tbl.Com
HAVING (((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
((([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
((([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![client]) Is Null) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null)) OR
(((tbl.Track)=[forms]![reportselection]![track]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![po]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![from]) Is Null) AND
(([forms]![reportselection]![dateto]) Is Null) AND
(([forms]![reportselection]![doctype]) Is Null) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR
..................(((tbl.Rec) Between [forms]![reportselection]![from] And
[forms]![reportselection]![dateto]) AND ((tbl.Client) Like "*" &
[forms]![reportselection]![client] & "*") AND ((doc.Doc) Like "*" &
[forms]![reportselection]![doctype] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
(([forms]![reportselection]![fc]) Is Null) AND
(([forms]![reportselection]![track]) Is Null)) OR (((tbl.Rec) Between
[forms]![reportselection]![from] And [forms]![reportselection]![dateto]) AND
((tbl.Client) Like "*" & [forms]![reportselection]![client] & "*") AND
((doc.Doc) Like "*" & [forms]![reportselection]![doctype] & "*") AND
((tbl.PO)=[forms]![reportselection]![po]) AND
((tbl.FC)=[forms]![reportselection]![fc]) AND
(([forms]![reportselection]![track]) Is Null))
ORDER BY tbl.Rec, tbl.Dept, tbl.Client, doc.Doc, tbl.FC;
Thanks for your help! It is very much appreciated.