Hi all, I'm trying to get a sql to work in code, but there is a mistake somewhere in the code, can't find what i need to change for it to work, here is the code:
The problem is at the IsSelectedVar that is in a module and filter all the selected item on the form VendorOrder and the list box txtvendor#.
Thanks for your help!
Code:
strsql = "SELECT [PO Header].Vendor, [PO Detail].Part, [PO Detail].Transfert1, [PO Detail].TrsfStore, [PO Detail].Order1, [PO Detail].Comment, [PO Detail].LSTCOST, [DFR Detail].ORDER " & _
"FROM ([PO Header] INNER JOIN [Date du Traitement de PO] ON [PO Header].Date = [Date du Traitement de PO].DateTraitement) INNER JOIN ([PO Detail] LEFT JOIN [DFR Detail] ON [PO Detail].STPart = [DFR Detail].STITEM) ON [PO Header].AccessID = [PO Detail].AccessID " & _
"WHERE [PO Detail].[Store#]= '" & [Forms]![vendororder]![ChkStore] & "'" & _
"AND " & IsSelectedVar("VendorOrder", "txtVendor#", [Vendor]) = -1
The problem is at the IsSelectedVar that is in a module and filter all the selected item on the form VendorOrder and the list box txtvendor#.
Thanks for your help!