Please see below for the SQL Statements for all the queries that are involved. The crosstab query looks to Query 3 which uses Query 2 which uses Query 1. Could the problem be that I am using to may queries? Query 1 and 2 are also used for other reports that are working fine. We also just converted to Access 2003 with Windows XP.
Query1:
PARAMETERS [AS OF DATE] DateTime;
SELECT [CREDIT BUREAU STOPS].*, [ALLTEL USERID CODES].[USER ID NUMBER], [ALLTEL USERID CODES].NAME, [ALLTEL USERID CODES].DEPARTMENT, IIf([DEPARTMENT] Is Not Null,[DEPARTMENT],"DEPARTMENT NAME MISSING") AS [DEPARTMENT NAME], DateValue([AS OF DATE])-[CREDIT BUREAU STOPS].[CREDIT BUREAU CODE CHANGE DATE] AS AGE, IIf([AGE]>360,"f. >360",IIf([AGE]>180,"e. 181-360",IIf([AGE]>90,"d. 91-180",IIf([AGE]>60,"c. 61-90",IIf([AGE]>30,"b. 31-60",IIf([AGE]>-1,"a. 0-30","g. MISSING")))))) AS [AGE CATEGORY]
FROM ([CREDIT BUREAU STOPS] LEFT JOIN [CREDIT BUREAU STOPS + TASKS OUTSTANDING QUERY] ON [CREDIT BUREAU STOPS].[LOAN NUMBER] = [CREDIT BUREAU STOPS + TASKS OUTSTANDING QUERY].[LOAN NUMBER]) LEFT JOIN [ALLTEL USERID CODES] ON [CREDIT BUREAU STOPS].[CREDIT BUREAU CODE CHG BY ID] = [ALLTEL USERID CODES].[USER ID NUMBER]
WHERE ((([CREDIT BUREAU STOPS + TASKS OUTSTANDING QUERY].[TASK ID]) Is Null) AND (([CREDIT BUREAU STOPS].[CREDIT BUREAU CODE EXPIRE DATE]) Is Null));
Query2:
PARAMETERS [AS OF DATE] DateTime;
SELECT [CREDIT BUREAU STOPS].*, [TASKS OUTSTANDING].[TASK ID], [TASKS OUTSTANDING].[TASK ID DESCRIPTION], [TASKS OUTSTANDING].[TASK RECEIVED DATE], [TASKS OUTSTANDING].[TASK START DATE], [TASKS OUTSTANDING].[TASK LAST UPDATE DATE], [TASKS OUTSTANDING].[TASK FOLLOW UP DATE], [TASKS OUTSTANDING].[TASK ORIG EXPECTED CLOSE DATE], [TASKS OUTSTANDING].[TASK EXPECTED CLOSE DATE], [TASKS OUTSTANDING].[TASK RESPONSIBLE ID], [TASKS OUTSTANDING].[TASK RESPONSIBLE DEPARTMENT ID], [TASK RESPONSIBLE DEPARTMENT].[TASK RESPONSIBLE DEPARTMENT NAME]
FROM ([CREDIT BUREAU STOPS] LEFT JOIN [TASKS OUTSTANDING] ON [CREDIT BUREAU STOPS].[LOAN NUMBER] = [TASKS OUTSTANDING].[LOAN NUMBER]) LEFT JOIN [TASK RESPONSIBLE DEPARTMENT] ON [TASKS OUTSTANDING].[TASK RESPONSIBLE DEPARTMENT ID] = [TASK RESPONSIBLE DEPARTMENT].[TASK RESPONSIBLE DEPARTMENT ID]
WHERE ((([TASKS OUTSTANDING].[TASK ID])="CAREVR" Or ([TASKS OUTSTANDING].[TASK ID])="CALSTP" Or ([TASKS OUTSTANDING].[TASK ID])="CALST2" Or ([TASKS OUTSTANDING].[TASK ID])="CAMICR" Or ([TASKS OUTSTANDING].[TASK ID])="CAMIC2" Or ([TASKS OUTSTANDING].[TASK ID])="CRPTOS" Or ([TASKS OUTSTANDING].[TASK ID])="SLSERV" Or ([TASKS OUTSTANDING].[TASK ID])="SLSSR_" Or ([TASKS OUTSTANDING].[TASK ID])="SLEMSR" Or ([TASKS OUTSTANDING].[TASK ID])="MISAPP" Or ([TASKS OUTSTANDING].[TASK ID])="WCPTOS" Or ([TASKS OUTSTANDING].[TASK ID])="CRFDUE" Or ([TASKS OUTSTANDING].[TASK ID])="CAREVS"));
Query3:
PARAMETERS [AS OF DATE] DateTime;
SELECT [CREDIT BUREAU STOPS].*, [ALLTEL USERID CODES].[USER ID NUMBER], [ALLTEL USERID CODES].NAME, [ALLTEL USERID CODES].DEPARTMENT, IIf([DEPARTMENT] Is Not Null,[DEPARTMENT],"DEPARTMENT NAME MISSING") AS [DEPARTMENT NAME], DateValue([AS OF DATE])-[CREDIT BUREAU STOPS].[CREDIT BUREAU CODE CHANGE DATE] AS AGE, IIf([AGE]>360,"f. >360",IIf([AGE]>180,"e. 181-360",IIf([AGE]>90,"d. 91-180",IIf([AGE]>60,"c. 61-90",IIf([AGE]>30,"b. 31-60",IIf([AGE]>-1,"a. 0-30","g. MISSING")))))) AS [AGE CATEGORY]
FROM ([CREDIT BUREAU STOPS] LEFT JOIN [CREDIT BUREAU STOPS + TASKS OUTSTANDING QUERY] ON [CREDIT BUREAU STOPS].[LOAN NUMBER] = [CREDIT BUREAU STOPS + TASKS OUTSTANDING QUERY].[LOAN NUMBER]) LEFT JOIN [ALLTEL USERID CODES] ON [CREDIT BUREAU STOPS].[CREDIT BUREAU CODE CHG BY ID] = [ALLTEL USERID CODES].[USER ID NUMBER]
WHERE ((([CREDIT BUREAU STOPS].[CREDIT BUREAU CODE EXPIRE DATE]) Is Not Null));
Crosstab Query:
PARAMETERS [AS OF DATE] DateTime;
TRANSFORM Count([CREDIT BUREAU STOPS WITH EXPIRATION DATES QUERY].[DEPARTMENT NAME]) AS [CountOfDEPARTMENT NAME]
SELECT [CREDIT BUREAU STOPS WITH EXPIRATION DATES QUERY].[DEPARTMENT NAME], Count([CREDIT BUREAU STOPS WITH EXPIRATION DATES QUERY].[AGE CATEGORY]) AS [CountOfAGE CATEGORY]
FROM [CREDIT BUREAU STOPS WITH EXPIRATION DATES QUERY]
GROUP BY [CREDIT BUREAU STOPS WITH EXPIRATION DATES QUERY].[DEPARTMENT NAME]
PIVOT [CREDIT BUREAU STOPS WITH EXPIRATION DATES QUERY].[AGE CATEGORY];