Hi, I made a query to UNION two tables with same structures. One is WorkOrderActive and WorkOrderDone. Both tables have INNER JOIN to a CustomerTable. So in both WorkOrderActive and WorkOrderDone tables, i only have the CustID field. In the WorkOrderForm, it shows all the CustomerTable fields. When not UNIONized, i can run FilterByForm; choose LastName and i can see in a combobox the Name i want to search. But when UNIONized, the LastName combobox only says "Null and IsNotNull"; doesnt show the LastNames.
Here's my code to UNIONized the 2 tables:
SELECT * FROM [2 Customer Info] INNER JOIN [4 Work Order Data (Active Jobs)] ON [2 Customer Info].CustID = [4 Work Order Data (Active Jobs)].CustID UNION ALL SELECT * FROM [2 Customer Info] INNER JOIN [4 Work Order Data (Completed Jobs)] ON [2 Customer Info].CustID = [4 Work Order Data (Completed Jobs)].CustID;
Here's my code to UNIONized the 2 tables:
SELECT * FROM [2 Customer Info] INNER JOIN [4 Work Order Data (Active Jobs)] ON [2 Customer Info].CustID = [4 Work Order Data (Active Jobs)].CustID UNION ALL SELECT * FROM [2 Customer Info] INNER JOIN [4 Work Order Data (Completed Jobs)] ON [2 Customer Info].CustID = [4 Work Order Data (Completed Jobs)].CustID;