
Originally Posted by
pbaldy
Can't look at the sample right now, but it sounds like you need to add a second instance of tblAllocatedBin to the query and join the second field to it. Access will alias it to ..._1.
Thanks, what you said pointed me in the right direction. I seem to have got it to work by adding 2 instances of tblProduct and joining them to tblAllocatedBin.
Code:
UPDATE (tblBinType RIGHT JOIN (tblBin LEFT JOIN (tblAllocatedBin LEFT JOIN tblProduct
ON tblAllocatedBin.allocated_bin_id = tblProduct.allocated_bin_1)
ON tblBin.bin_id = tblAllocatedBin.allocated_bin)
ON tblBinType.bin_type_id = tblAllocatedBin.allocated_bin_type)
LEFT JOIN tblProduct AS tblProduct_1
ON tblAllocatedBin.allocated_bin_id = tblProduct_1.allocated_bin_2
SET tblBin.bin_width_mm = 0
WHERE (((tblProduct.allocated_bin_1) Is Null) AND ((tblProduct_1.allocated_bin_2) Is Null) AND ((tblBinType.calculate_bin_by_product)=True));