TransferText with a Stored Procedure

  • Thread starter Thread starter BK
  • Start date Start date
B

BK

I'm having a bit of a problem with a transfertext operation. Below is
my code...extremely simple, with probable word wrap.

Private Sub cmdGenerateFile_Click()

'DoCmd.OpenStoredProcedure "dbo.GasSalesExport"
DoCmd.TransferText acExportDelim, , "dbo.GasSalesExport",
"c:\pcidb\NewGasSalesExport.txt"

End Sub

Note that the first line is commented out. When I run this code I get
an error saying that it can't find the object "dbo.GasSalesExport."
I've tried it with and without the dbo part. However if I uncomment the
first line it opens up the stored procedure without problem (but only
when I have the dbo part), so it's definitely there and recognizes it.
Can I not do transfer text with a stored procedure?

TIA,
Bill
 
Back
Top