MS Access 2000 - Used Union Query, Report Asking for Paramaters? - TechRepublic
General discussion
December 19, 2008 at 09:17 AM
tammy.estes

MS Access 2000 – Used Union Query, Report Asking for Paramaters?

by tammy.estes . Updated 17 years, 6 months ago

Ok I created 4 queries. The first 3 queries compile data from different tables (all different but not the same) based on an expiration date meeting a certain criteria (the criteria is not important here).

The 4th query is a union query combining all of the data. Here is the SQL code:
SELECT [Business Name], [Contact], [Address1], [Address2], [City], [State], [Zip], [Home Phone], [Work Phone], [Date Expires]
FROM [Certifications Expiring]
UNION SELECT [Business Name], [Contact], [Address1], [Address2], [City], [State], [Zip], [Home Phone], [Work Phone], [Date Expires]
FROM [Farm Permit Applications Query]
UNION SELECT [Business Name], [Contact], [Address1], [Address2], [City], [State], [Zip], [Home Phone], [Work Phone], [Date Expires]
FROM [Farms NMP Expiring]
ORDER BY [Date Expires];

I want to know where the data came from (which query) so I thought of setting up an Expression called Table in each of the first 3 queries so that the records can be defined. This expression will later be used in the Table Header to group all records to that specific Query or “table”. I did not create a make table for this job.

Now if I run the 4th query or even any of the individual queries it asks for a parameter (it’s looking for the Query which will only allow me to use ONE. Then it will report on that one and not all of them.

How do I fix this problem?

Thanks to all in advance.

This discussion is locked

All Comments