It may be just the word "Set" missing before rst =, but your usage doesn't seem to match the parameters of the Execute method for a Command object: http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
I'd switch the code to something like:
Code:
Set cmd = New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandText = "prcRPTPlantPastDuePaymentsReportCO2"
cmd.CommandType = adCmdStoredProc
Set rst = cmd.Execute()
You can also try this syntax replacing the last line:
Code:
Set rst = New ADODB.Recordset
rst.Open cmd
Reference - http://msdn.microsoft.com/en-us/library/office/aa160695