Jet Engine Cannot Open The File

A

Alan Z. Scharf

1. Get following message when trying to import a text file into a table.

The Microsoft Jet engine cannot open the file. It is already opened
exclusively by another user, or you need permission to view its data.

2. The forum messages I've found in Google on this error all sem to relate
to SQLServer- and web-related matters.
This, however, is just a simple import of text file created by shelling to
DIR.

3. My code is as follows:

Shell ("cmd /c ERASE C:\Permal\DocumentFiles.txt")
Shell ("cmd /c DIR /b C:\Permal\Documents\ >
C:\Permal\DocumentFiles.txt")
DoCmd.TransferText acImportDelim, "", "tblDocumentFiles",
"C:\Permal\DocumentFiles.txt", False, ""

4. NOTE:
A. Sometimes it works, and sometimes it doesn't. I don't see pattern.
B. Sometimes message includes ...cannot open the file
\DocumentFiles#txt', with '#' instead of a period between filename and
extension.

Any help would be appreciated.

Thanks.

Alan



--

___________________________
Alan Z. Scharf
GrapeVine Systems
New York City
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top