Record source error with stored procedure -- works in Access 2003,not in Access 2000

F

fcclient

I have an ADP (Access 2000 file format) that I have been programming in
Access 2003 (XP). Everything works terrific but when I try to run a
report in Access 2000 I receive the error:

Run-time error '2580'
The record source 'EXEC spBatchItemReport @cOrderList='50823"
specified on this form or report does not exist.

Note: The imbalanced quotes are exactly as given in the error message.

The code that generates this record source is:
Private Sub Report_Open(Cancel As Integer)
Dim strSQL As String
strSQL = "EXEC spBatchItemReport @cOrderList='" & _
[Forms]![Batch]![Orders] & "'"
Me.RecordSource = strSQL
End Sub


As I said, in Access 2003 it works perfect but in 2000 it generates the
above error. Even if I comment out the above Report_Open code and put
this information manually into the RecordSource I still get the error.

I can open the stored procedure by double-clicking it under Stored
Procedures in the Access 2000 application. It asks me for the cOrderList
parameter value then shows the result set.

Can anyone shed any light on this problem?

Thank you for your help,
Reg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top