SDO StockRecord Find/Search - Invalid Index for item retrieval

Hello,

I am doing a script for SDO to update specific products. In the past I did similar things with prices and it was successful.

relevant lines

Set oStock = oWS.CreateObject("StockRecord")
oStock.Fields.Item("STOCK_CODE").Value = CStr(Variables("stockcode"))
If oStock.Find(False) Then

I checked that the stock code field is filled with a valid value and that is the case. Yet on the third line I get the error

"Invalid Index for item retrieval - "

and I don't get why and tried many things and can't get it fixed. 

Thanks for feedback