Hi All,
I hope this is something simple.. I'm getting a retVal of 0 when pulling the Product Line, but nothing in the sLastErrorMsg. The message box displays nothing for the error. Other GetVals are working. Am I doing something wrong on the GetVal on the Product Line? Or do I have a typo I'm completely overlooking? Code is below.
Thanks!
retVal = oCIitem.nFind(sItemCode)
if retVal = 0 then
msgbox "Error looking up Item Code " & sItemCode & vbcrlf & oCIitem.sLastErrorMsg
end if
'get item cost and price
retVal = oCIitem.nGetValue("StandardUnitCost", StandardCost)
if retVal = 0 then
msgbox "Error looking up standard cost for item code " & sItemCode & vbcrlf & oCIitem.sLastErrorMsg
end if
retVal = oCIitem.nGetValue("StandardUnitPrice", StandardPrice)
if retVal = 0 then
msgbox "Error looking up standard price for item code " & sItemCode & vbcrlf & oCIitem.sLastErrorMsg
end if
'******ERROR OCCURS HERE AND RETURNS BLANK FOR oCIitem.sLastErrorMsg. THE REST OF THE MESSAGE DISPLAYS.
retVal = oCIitem.nGetValue("ProductLine$", sProdLine)
if retVal = 0 then
msgbox "Error looking up Product Line for item code " & sItemCode & vbcrlf & oCIitem.sLastErrorMsg
end if