G
Guest
I want to bring in all of the client numbers from 2 tables (Training Attendees and CounselingSessionInfo) but only those that fall in a certain date range. I was advised earlier to do a Union Query with limitations. But, the Training Attendee table is linked to the Training Session Info table and that's the table with the date in it; the training attendee table only has the client number, last name, attendee number, and training session numbers. Below is what I tried to use for this Union Query, but it brings back a prompt asking to specifiy the training start date. It brings the Counseled clients with no problem. I've doubled checked all of the spelling and everything is spelled right so I think it's in the SQL statement. If someone could take a look at this and let me know what I did wrong I would greatly appreciate it. Thanks
SELECT ClientNumber FROM CounselingSessionInformation WHERE (CounselingSessionInformation.[CounselingDate]) BETWEEN #10/01/2003# AND #12/31/2003#
UNION SELECT ClientNumber FROM TrainingSessionAttendees WHERE (TrainingSessionInformation.[StartTrainingDate]) BETWEEN #10/01/2003# AND #12/31/2003#;
SELECT ClientNumber FROM CounselingSessionInformation WHERE (CounselingSessionInformation.[CounselingDate]) BETWEEN #10/01/2003# AND #12/31/2003#
UNION SELECT ClientNumber FROM TrainingSessionAttendees WHERE (TrainingSessionInformation.[StartTrainingDate]) BETWEEN #10/01/2003# AND #12/31/2003#;