Hi All:
This is giving me a hard time... What I need is to export multiple queries to a different comma delimited txt files, based in different criterias using VB code with a touch of a button.. But I don't want to create such queries at all (about 185) which is a long trip, even using copy-paste. I understand that this can be done with SQL statements embbeded into the code. This is what I found in Access 2K Help:
DoCmd.TransferText acExportDelim, "Standard Output", _
"External Report", "C:\Txtfiles\April.doc"
Dim dbs As Database, qdf As QueryDef, strSQL As String
Set dbs = CurrentDb
strSQL = "SELECT * FROM Orders WHERE OrderDate >#3-31-96#;"
Set qdf = dbs.CreateQueryDef("SecondQuarter", strSQL)
What I want is to set a different criterias in a new statement for each file exported based only in one unique table.
Can somebody join those two pieces of cake above for me?...I'll appreciate it. Thanks.

This is giving me a hard time... What I need is to export multiple queries to a different comma delimited txt files, based in different criterias using VB code with a touch of a button.. But I don't want to create such queries at all (about 185) which is a long trip, even using copy-paste. I understand that this can be done with SQL statements embbeded into the code. This is what I found in Access 2K Help:
DoCmd.TransferText acExportDelim, "Standard Output", _
"External Report", "C:\Txtfiles\April.doc"
Dim dbs As Database, qdf As QueryDef, strSQL As String
Set dbs = CurrentDb
strSQL = "SELECT * FROM Orders WHERE OrderDate >#3-31-96#;"
Set qdf = dbs.CreateQueryDef("SecondQuarter", strSQL)
What I want is to set a different criterias in a new statement for each file exported based only in one unique table.
Can somebody join those two pieces of cake above for me?...I'll appreciate it. Thanks.
