Export for the excel a Stored Procedure passing parameters

G

galina

If anybody knows please help me. I need to export to the excel a stored
procedure with parameters. I am doing (simple version):

Dim par1 as String
Dim par2 as Integer
par1=Me.txtCust.Value
par2=Me.txtOrder.Value
DoCmd.OutputTo acOutputStoredProcedure, "sproc_Culc" & " '" & par1 &
"'," & par2,acFormatXLS, "Order.xls",True

I have an error "Invalid Object".

I anybody knows please e-mail me [email protected]

Thanks in advance, Galina.
 
Top