Hi, I have a query
It is to update the field Distributor and PONumber in table TmpTblAlcReport, where field OrderID= variable orderID AND field UnitID= variable unitID AND field Distributor is empty (Otherwise it will replace the existing value in distributor field.)
But I got error message saying datatype mismatch.
I tried "AND Distributor=""" and it says error Syntax error in string query expression ....
anyone help? Thanks!
Code:
insertTmpTblAlcReportQry = "UPDATE TmpTblAlcReport SET Distributor='" & custName & "', PONumber='" & PONumber & "' WHERE OrderID=" & OrderID & " AND UnitID=" & UnitID & " AND isempty(Distributor)"
It is to update the field Distributor and PONumber in table TmpTblAlcReport, where field OrderID= variable orderID AND field UnitID= variable unitID AND field Distributor is empty (Otherwise it will replace the existing value in distributor field.)
But I got error message saying datatype mismatch.
I tried "AND Distributor=""" and it says error Syntax error in string query expression ....
anyone help? Thanks!