I have the following code, which runs great. Until it hits around 11,000 records exported then it stops. I get a runtime error 3310.
Anyway to work around this? I'm currently just removing the newly exported records from the table and restarting the procedure. But I have hundreds of thousands of records . . . would rather not baby sit.
Dim rs As DAO.Recordset, db As DAO.Database
Dim strCsv As String, qd As DAO.QueryDef, sSql As String
Set db = CurrentDb
Set qd = db.QueryDefs("qryAcctList")
Set rs = CurrentDb.OpenRecordset("tblAcctList")
Do Until rs.EOF
strCsv = rs(0) & ".txt"
sSql = "select c1,c2,c3,c4,c5,c6,c7,c8 from tblAcctList where AcctNumber='" & rs(0) & "'"
qd.SQL = sSql
DoCmd.TransferText acExportDelim, AcctNumber, "qryAcctlist", "c:\CSVfolder\" & strCsv, False