Hmmmm, Hi again, I see from your code line that it is a function. The function will only return a recordset, no Hresult!, if you want to put a value in Hresult, maybe you need a Public Sub GetRS(ByVal ID as integer, Optional ByRef Hresult as Variant, RS as ADODB.Recordset )

André