Hi
I have 2 queries that count items from 2 fields in the same table.
My first query is called qryBinCapacityMasterBin
HTML Code:
SELECT tblBinType.bin_type, Count(tblAllocatedBin.allocated_bin_type) AS CountOfallocated_bin_type, Count(tblProduct.allocated_bin_1) AS
CountOfallocated_bin_1, Round(Count([tblProduct.allocated_bin_1])/Count([tblAllocatedBin.allocated_bin])*100,1) AS [Capacity%]FROM (tblAllocatedBin LEFT JOIN
tblProduct ON
tblAllocatedBin.allocated_bin_id = tblProduct.[allocated_bin_1]) LEFT JOIN tblBinType ON
tblAllocatedBin.allocated_bin_type = tblBinType.bin_type_idGROUP BY tblBinType.bin_type;
and produces this result
My second query is called qryBinCapacitySecondBin
HTML Code:
SELECT tblBinType.bin_type, Count(tblAllocatedBin.allocated_bin_type) AS CountOfallocated_bin_type, Count(tblProduct.allocated_bin_2) AS
CountOfallocated_bin_2, Round(Count([tblProduct.allocated_bin_2])/Count([tblAllocatedBin.allocated_bin])*100,1) AS [Capacity%]FROM (tblAllocatedBin LEFT JOIN
tblBinType ON
tblAllocatedBin.allocated_bin_type = tblBinType.bin_type_id) LEFT JOIN tblProduct ON
tblAllocatedBin.allocated_bin_id = tblProduct.allocated_bin_2GROUP BY tblBinType.bin_type;
and produces this result
The 2 queries are identical except they are looking from 2 different fields. I would like to merge the results into one total. I've been trying UNION queries but have not been able to produce the desired result. What is the best way of acheiving this please?