I post the function in case you notice something...
Public Function UpdateSAPConfirmedQuants(xTable)
Static M As Recordset, UpdateSAPConfirmedQuants_SQL
Static Ret As Variant, z As Long, TotalRecs, xText
Static curKG, curST, curWCtxt, preKG, preST, preWCtxt
Static x, i, itxt...