Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft Access 2000 and Export Specification Problems

Status
Not open for further replies.

dede2897234

Programmer
Oct 11, 2001
7
US
I am currently modifying a custom Microsoft Access 2000 application that exports data from three queries to three text files. Two out of the three text files export successfully. However, during the process of exporting the data from the last query, I get the following error message: "The Microsoft Jet database engine could not find the object 'xxxxx.txt'. Make sure the object exists and that you spell its name and the path name correctly." Does anyone know why I am getting this error message? Thanks.
 
hiya,

You compacted & repaired the database lately?

Have you run each each query individually to isolate the problem export query?

Regards,

Darrylle

"Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk
 
Darrylles,

Thanks for responding to my thread. I tried to compact and repair the database and ran the query associated with the export specification. The query ran fine. None of these two solutions solved my problem with exporting the data from the third query. Are there any other possible solutions for my problem? Thanks.

 
I assume its a macro or code thats exporting the xxxx.txt?

Ensure that the file actually exists on your hard drive and is in the place the cade / macro says it is.

Hope this helps
 
Psyclones,

Thanks for responding to my thread. It is VBA code, a query, and an export specification that is exporting the data from the Access 2000 application to a text file. Here is the VBA code to produce the text file:

DoCmd.TransferText acExportDelim, "OtherPay Export Specification", "qOtherPayExport", sOtherPay, False, ""

"qOtherPayExport" is the query and "sOtherPay" is a variable that contains the directory (in string format) where the text file will be saved on the computer. The directory does exist on the computer. However, the application errors when creating or saving the text file to the computer's hard drive in this fashion: "The Microsoft Jet database engine could not find the object 'xxxxx.txt'. Make sure the object exists and that you spell its name and the path name correctly." However, the rest of the VBA code correctly creates and saves the other two text files to the hard drive in the specified directory.
 
For the interest of curiosity try commenting out that code and add the following:

DoCmd.TransferText acExportDelim, "OtherPay Export Specification", "qOtherPayExport", "c:/test.txt", False, ""

where c:\test.txt is = to whatever is in the sOtherPay

debug and compile it and see if that works

hope this helps
 
Psyclones,

Thanks for responding to my thread. I created a new export specification (with the same exact fields as in the old one), saved it under another name, and modified the VBA code to reference this new export specification. It worked! I was able to export this text file. I then deleted the previous non-working export specification under the old name. The lesson that I learned is that if you modify an existing export or import specification and you get an error message when it is run, create a new export or import specification that resembles the old one and save it under a new name. Then, modify your VBA code to reference the new one and delete the old export or import specification.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top