Call GetRSRO(rs, "select * from system where sy_primary = 1")Here's the module code...
Option Explicit Public Sub GetRSRO(rsGetName As ADODB.Recordset, strSQL As String) Dim intanswer As Integer On Error GoTo ErrHandler 'get a readonly recordset Set rsGetName = New ADODB.Recordset rsGetName.Open strSQL, DB, adOpenStatic, adLockReadOnly, adCmdText ErrHandler: If Err.Number = -2147467259 Then intanswer = MsgBox(" Unable to open the database at this time... ", vbRetryCancel + vbCritical, oAppName) Err.Clear If intanswer = vbRetry Then 'retry code here Else MsgBox "" & oAppName & " will now close - please launch " & oAppName & " and try again... " ShutDown End If Else MsgBox " An error has occurred - Error number: " & Err.Number & " Error description: " & Err.Description & " Error source: " & Err.Source Err.Clear End If End SubNow the article talks about not doing this but to pass the error back to the calling sub - how do I do this? The calling sub is expecting a recordset back...