Dim res As Recordset
    Set rst = New ADODB.Recordset
    Set rst = LoadInfoIntoRest("Access", screenID)
    If rst.EOF = True Then    Else
        s = rst!name
    End If然后在模块里写
Public Function LoadInfoIntoRest(strProcedurename As String, strscreenID As String) As Recordset
    Set cmd = New ADODB.Command
    With cmd
        .CommandType = adCmdStoredProc
        .CommandText = strProcedurename 'store procedure name
        .ActiveConnection = CN
    End With
    Set LoadInfoIntoRest = cmd.Execute    
    Exit Function出错,好象recerdset不能当函数返回值,怎么弄法?