Trying to get customer part data and I can’t seem to get the syntax correct.
Need a bit of help because I have tried and just can’t get it to work.
WhereClauses.Add(“CustXPrt”, “CustNum=’” & intCustNum & “’”) works to get all customer parts, but
WhereClauses.Add(“CustXPrt”, “CustNum=’” & intCustNum & “’” and “XPartNum=’” & strxPartNum & “’”) gives the error below.
Conversion from string “CustNum=‘1’” to type ‘Long’ is not valid.
I must have quotes or an apostrophe in the wrong spot somewhere for 2 parameters.
Against a UD table this works, but is different syntax because of the false instead of second parameter.
wherClauses.Add(“UD01”, “Character08=’” & JobNum & “’ and checkbox02 = false”)
OK got it going. There was also no space before the and in my code and that gave this.
Invalid Where-Clause: Alpha compare against Numeric Column: ‘CUSTNUM=1AND XPARTNUM=‘1035TESTPART2’’