I found out how to trap ODBC errors:
Private Sub sbSendOutLOFaxes()
Dim db As DAO.Database
Dim l As Long
Dim Rs As DAO.Recordset
On Error GoTo trap
Set db = DBEngine.Workspaces(0).Ope
' For SPs that return rows.
Set Rs = db.OpenRecordset("LOFaxSel
MsgBox Rs("Lender")
Set Rs = Nothing
Set db = Nothing
trap:
Dim MyError As Error
MsgBox Errors.count
For Each MyError In DBEngine.Errors
With MyError
MsgBox .Number & " " & .Description
End With
Next MyError
End Sub
My new trap: code reveals the following:
Type Mismatch
but where is the mismatch? RS is of type Recordset. I am able to pass parameters as part of the Stored Procedure name, aren't I?
Thanks!
Main Topics
Browse All Topics





by: knowltonPosted on 2002-09-26 at 08:09:17ID: 7304922
The call to the Stored Procedure works from a Query Pass Through object:
LOFaxSelect '9/26/2002'
This returns several rows.