' Run SQL here to insert records into PartMaster
SQL = "INSERT INTO partmaster ( partdesc, uom, averageunitcost, averagequantity, currentunitcost, currentdate, currentsupplier, currentquantity, taxable ) values (" & SavePartNumber & ", " & uomdefault & ", " & averageunitcost & ", " & averageQuantity & ", " & rs!UnitPrice & ", #" & rs!PurchaseDate & "#, " & rs!SupplierName & ", " & rs!Quantity & ", " & rs!taxable & ");"
DoCmd.RunSQL SQL
The rs!SupplierName field has the value "Home Depot" in debug. The currentsupplier field is same text format and the same 25 long.
The error is: Syntax error (missing operator) in query expression 'Home Depot'
SQL = "INSERT INTO partmaster ( partdesc, uom, averageunitcost, averagequantity, currentunitcost, currentdate, currentsupplier, currentquantity, taxable ) values (" & SavePartNumber & ", " & uomdefault & ", " & averageunitcost & ", " & averageQuantity & ", " & rs!UnitPrice & ", #" & rs!PurchaseDate & "#, " & rs!SupplierName & ", " & rs!Quantity & ", " & rs!taxable & ");"
DoCmd.RunSQL SQL
The rs!SupplierName field has the value "Home Depot" in debug. The currentsupplier field is same text format and the same 25 long.
The error is: Syntax error (missing operator) in query expression 'Home Depot'