I am running exactly like you set it up.
SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [M00091 Partial 2 Claims]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [M00091 Partial 3 Claims]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [M00091 Partial 4 Claims]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [M00091 Partial 5 Claims]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [M00091 Partial 6 Claims]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [M00091 Partial 7 Claims]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [M00091 Partial 8 Claims]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [M00091 Partial 9 Claims]
GROUP BY SSN
HAVING [Sent to Disbo] = #12/15/2005#;
Error:
You tried to execute a query that does not include the specified expression 'Sent to Disbo' as part of an aggregate function.
RuralGuy - You are awsome and doing a great job helping me. Thank you so much.
I have found a longer way to do it. I do a query on every partial that looks like this:
SELECT [M00091 Partial 1 Claims].SSN, [M00091 Partial 1 Claims].[Sent to Disbo], [M00091 Partial 1 Claims].[Start Date], [M00091 Partial 1 Claims].[End Date]
FROM [M00091 Partial 1 Claims]
WHERE ((([M00091 Partial 1 Claims].[Sent to Disbo])=#12/15/2005#));
Then I set the Union query like you orginal set up that looks like this:
SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [P1 SD]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [P2 SD]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [P3 SD]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [P4 SD]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [P5 SD]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [P6 SD]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [P7 SD]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [P8 SD]
UNION SELECT SSN, [Sent to Disbo], [Start Date], [End Date] FROM [P9 SD]
WHERE [Sent to Disbo] = [Enter Date mm/dd/yyyy]
ORDER BY SSN;
Result:
Sent to Disbo_____Start Date_______End Date
12/15/2005_______7/31/2005_______11/26/2005
12/15/2005_______11/1/2005_______11/30/2005
12/15/2005_______11/1/2005_______11/30/2005
12/15/2005_______11/1/2005_______11/30/2005
12/15/2005_______11/1/2005_______11/30/2005
12/15/2005_______11/1/2005_______11/30/2005
The only problem with doing it this way is that this report will be run daily and require changes be made to a lot of queries.