I have a table with particular data that I want to export to a comma delimited file. The parameter values may vary daily.
I have a query which utilizes parameters from a form tied to a table so the parameters are stored. I'm viewing the query from within this form as a subform and it's working great.
Now the problem. I want to take these query results and export to a .csv file. I've tried this code
CODE
Private Sub btnProcessSamples_Click()
DoCmd.TransferText acExportDelim, , "qrySampleExport2", "G:\PODRiso\Sample Lists\Samples\Samples.csv", False
End Sub
DoCmd.TransferText acExportDelim, , "qrySampleExport2", "G:\PODRiso\Sample Lists\Samples\Samples.csv", False
End Sub
, but it asks for the parameters already provided by the form. If I replace the query name with the name of the subform, I get this error.
Run-time error '3011'
The Microsoft Access database engine could not find the object 'subfrmSampleExport2'. Make sure the object exists and that you spell its name and the path name correctly.
Any ideas??
