Union query with attachments - possible?

Hayleywart

New member
Local time
Today, 16:52
Joined
Dec 18, 2014
Messages
6
Please forgive my ignorance, I'm very new to Access....

I have two basic lists of employee names, ID's, phone numbers etc, with one field containing an attachment with a picture of their ID. I don't want to permanently combine these two lists of employees, as they work in different departments, but for certain events I need to be able to print a report with a list of all their names, ID numbers, and corresponding ID photos.

I tried to make a UNION query, but can't do it with the attachment field. If I leave that field out, it's no problem. To simplify, I have been doing a test run as follows, with just the name field and photo field (field 1).

SELECT [Starting Gate employees].[Employee name], [Starting Gate employees].Field2
FROM [Starting Gate employees]
UNION
SELECT [Farrier employees].[Employee name], [Farrier employees].Field2
FROM [Farrier employees];


Is there another way to do it?
 
Do these seperate tables contain the same fields? If so, you do need all the data together.

You don't make a new table for every department, you add a field in your table to designate which department they belong to:

Employees
EmployeeID, DeptID, FName, LName
1, 3, John, Smith
2, 3, Sally, Jones
3, 17, David, Jenkins
6, 3, Steve, Henderson

That's how your table for this should be structured. Then no UNION query necessary, just run a regular one.
 
Thanks for your reply. I did consider having them all in one table, but the fields are quite different If there is no other way I will, but was hoping a query could solve this more easily.
 

Users who are viewing this thread

Back
Top Bottom