G
Guest
I would like to find a way of determining if a table contains records in one
that are not in another from code. I have written the following unmatched
query that gives the number of records that are unmatched.
SELECT Count(tbl_Costs_Temp.ProductID) AS CountOfProductID
FROM tbl_Costs_Temp LEFT JOIN tbl_Product_HDR ON tbl_Costs_Temp.ProductID =
tbl_Product_HDR.ProductID
GROUP BY tbl_Product_HDR.ProductID
HAVING (((tbl_Product_HDR.ProductID) Is Null));
How do I refer to this in code without opening the query? The test would be
if True then the number of records in the query should be greater than 0.
This is a start of what I have in mind....
Am i approaching this the right way?
Bruce
eg
If myQuery >0 then
msgbox("Use have new Products")
End
Else
'do something'
End If
that are not in another from code. I have written the following unmatched
query that gives the number of records that are unmatched.
SELECT Count(tbl_Costs_Temp.ProductID) AS CountOfProductID
FROM tbl_Costs_Temp LEFT JOIN tbl_Product_HDR ON tbl_Costs_Temp.ProductID =
tbl_Product_HDR.ProductID
GROUP BY tbl_Product_HDR.ProductID
HAVING (((tbl_Product_HDR.ProductID) Is Null));
How do I refer to this in code without opening the query? The test would be
if True then the number of records in the query should be greater than 0.
This is a start of what I have in mind....
Am i approaching this the right way?
Bruce
eg
If myQuery >0 then
msgbox("Use have new Products")
End
Else
'do something'
End If