I want to delete records from tblInventory which have been orphaned -- There is not a matching record in tblPick, and the PickID is not 0. PickID is 0 when the production crew is adding inventory or subtracting inventory. The query is asking me to select which table I want to delete from. I want to delete from tblInventory, but I don't know how to get the syntax right. Here is the code:
MrsBean
Code:
DELETE tblInventory.PickID, tblPick.PickID
FROM tblInventory LEFT JOIN tblPick ON tblInventory.PickID = tblPick.PickID
WHERE (((tblInventory.PickID)<>0) AND ((tblPick.PickID) Is Null));
MrsBean