Exporting a query to a text file

meadt

Registered User.
Local time
Today, 23:05
Joined
Oct 29, 2009
Messages
45
Hi Guys,

I'm trying to export the results of a query to a text file using the code below:

DoCmd.TransferText acExportDelim, "DE16 Import Specification", "Query1", "c:\winnt\PROFILES\mead_t\Desktop\testing.txt"

But when I run it I get the error:

The Microsoft Jet database engine could not find the object 'test.txt. Make sure the object exists.

When I do this with a table it works fine.

Cheers

T.
 
Do you have any other code in there as well?
 
No thats it, its linked to a command button on a form.
 
The script says testing.txt your comments say test.txt is this a typo? Does the actual path exist?
 
DoCmd.TransferText acExportDelim, "DE16 Import Specification", "Query1", "c:\winnt\PROFILES\mead_t\Desktop\testing.txt"
Besides what David said, also consider your naming conventions
 

Users who are viewing this thread

Back
Top Bottom