Union Query - Multiple Parameters

Purdue2479

Registered User.
Local time
Today, 21:19
Joined
Jul 1, 2003
Messages
52
I am trying to run the below union query, but it keeps asking for FRGHT_BL!FB_CREAT_DTM as a parameter. I want it to only ask for the Start Date and End Date once.

SELECT * FROM qLOC_ID WHERE(((FRGHT_BL!FB_CREAT_DTM) Between [Enter Start Date] And [Enter End Date])) UNION SELECT * FROM qLOC_ID2 WHERE(((FRGHT_BL!FB_CREAT_DTM) Between [Enter Start Date] And [Enter End Date])) UNION Select * From qLOC_ID3 WHERE(((FRGHT_BL!FB_CREAT_DTM) Between [Enter Start Date] And [Enter End Date]));
 
Not totally sure but the use of ! within a table name is possibly causing a problem

The fact that you have parameters in each of the Select Statements will certainly mean entering multiple start and end dates I believe

Only way around that would be to set Start and End Dates on a Form and then have queries using these values as parameters and then UNION the queries.

Select * from Query 1
UNION
Select * from Query 2
etc

L
 

Users who are viewing this thread

Back
Top Bottom