By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,208 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

TrasferText Error 3310

P: n/a

The following code works fine for the first 100 or so iterations, then
gives an Error 3310 (This property isn't supported for external data
sources or for databases created in a previous version.). I am using
Access 2000. Any help would be GREATLY appreciated. Thank you!

DoCmd.TransferText acExportDelim, , "qryData", "C:\inmat.txt"

Nov 19 '06 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Does DoCmd.TransferSpreadsheet work, or does it still halt after 100

Nov 20 '06 #2

P: n/a
Hi maxhugen,

Thank you for your reply. I actually changed the approach alltogether
and am now looping through my recordset, creating an output string of
all of the values for each field for each record, then writing the
output string to a text file using the Print command. Not only does
this approach avoid the '100 iteration' pitfall, but each iteration is
also faster! I've included the code below in case you (or anyone else)
is interestd.


Public Sub mcrCreateTextFile(strObject As String, strFileName As

Dim rs As DAO.Recordset
Dim strSQL As String
Dim intFile As Integer
Dim strOutput As String
Dim qdfFieldNames As DAO.QueryDef
Dim fld As DAO.Field

strSQL = "SELECT * FROM " & strObject & ";"
intFile = FreeFile()

Set rs = CurrentDb.OpenRecordset(strSQL)
Open strFileName For Output As #intFile
Set qdfFieldNames = CurrentDb.QueryDefs(strObject)

With rs
Do While Not .EOF
For Each fld In qdfFieldNames.Fields
strOutput = strOutput & rs.Fields(fld.Name) & ","
strOutput = Left(strOutput, Len(strOutput) - 1) &
End With
Set rs = Nothing

strOutput = Left(strOutput, Len(strOutput) - 2)
Print #intFile, strOutput
Close #intFile
End Sub

Nov 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.