gnatsnyder
Technical User
I am new to Access but I have gotten deep. I have a report that is populated by a large number of individual queries. The data source for the report is a single query linked to the individual (large number) queries. When one or more individual queries returns nothing (null?) then none of the other queries will return anything. I have reproduced this problem that I am having at work in Northwind. The query that returns nothing looks like this:
SELECT Customers.Region, Customers.[Customer Status], Customers.[Credit Terms], Count(Customers.Region) AS CountOfRegion
FROM Customers
GROUP BY Customers.Region, Customers.[Customer Status], Customers.[Credit Terms]
HAVING (((Customers.Region)="USA"
AND ((Customers.[Customer Status])="Closed"
AND ((Customers.[Credit Terms])="2% 10-Net 30"
AND ((Count(Customers.Region))=IIf(IsNull([CountOfRegion]),"0",[CountOfRegion])));
as you can see I am trying to filter records based on more than a few criteria and have been playing around with the IIF statement, IsNull, Nz and a few other fixes. Right now when I run this I get the "Enter CountOfRegion Parameter" message box. This is kicking my behind! Please help!
SELECT Customers.Region, Customers.[Customer Status], Customers.[Credit Terms], Count(Customers.Region) AS CountOfRegion
FROM Customers
GROUP BY Customers.Region, Customers.[Customer Status], Customers.[Credit Terms]
HAVING (((Customers.Region)="USA"
as you can see I am trying to filter records based on more than a few criteria and have been playing around with the IIF statement, IsNull, Nz and a few other fixes. Right now when I run this I get the "Enter CountOfRegion Parameter" message box. This is kicking my behind! Please help!