Initially I had a field [cboVenderID] in tblPaymentInput. I realized that the Vendor ID does not need to be in that table. I have removed it. Now the sql statement for a report I have needs to be edited to remove the reference to the Vender ID field and I have tried different iterations of corrections but have not been able to achieve the desired result. Will someone please let me know what need to be removed from the following sql statement? Thanks
SELECT tbsInvoice.ysnClosed, tblVendor.strVendorName, tblPaymentInput.dtmDatePaid, tbsInvoice.curInvoiceTotal, tbsInvoice.intInvoiceNumber, tblCreditCardData.strCardLastName, [strAubreyProvidence] & "" & [intFundingCode] AS [Funding Code], tbsInvoice.strAubreyProvidence
FROM tblCreditCardData INNER JOIN (tblVendor INNER JOIN (tblPaymentInput INNER JOIN tbsInvoice ON (tblPaymentInput.cboInvoiceNumber = tbsInvoice.intInvoiceNumber) AND (tblPaymentInput.cboInvoiceNumber = tbsInvoice.intInvoiceNumber)) ON (tblVendor.intVendorID = tbsInvoice.[cboVendorID]) AND (tblVendor.intVendorID = tblPaymentInput.cboVendorID)) ON tblCreditCardData.intPaymentID = tblPaymentInput.cboPaymentID
WHERE (((tbsInvoice.ysnClosed)=False) AND ((tblVendor.strVendorName) Like "*" & [Enter Vendor Name (Use * to pull all records)] & "*") AND ((tblCreditCardData.strCardLastName)="Townsend"));