I want to delete some data in four tables in SQL server back end but the delete query below is failing to do so kindly check the query below and advise accordingly
DELETE DISTINCTROW tblCustomerInvoice.InvoiceID, tblCustomerInvoice.StatusOne
FROM ((tblCustomerInvoice INNER JOIN tblLineDetails ON tblCustomerInvoice.InvoiceID = tblLineDetails.InvoiceID) INNER JOIN tblSalesControls ON tblCustomerInvoice.InvoiceID = tblSalesControls.InvoiceID) INNER JOIN tblCostofSales ON tblCustomerInvoice.InvoiceID = tblCostofSales.InvoiceID
WHERE (((tblCustomerInvoice.InvoiceID)=[Forms]![frmSalesInvoiceDelete]![CboInvoice]) AND ((tblCustomerInvoice.StatusOne) Is Null)) OR (((tblCustomerInvoice.StatusOne)<>"1"));
What is the error message and how do you execute it? In Access or SQL Server?