"." changes to "#" in Access VBA DoCmd.TransferText call

D

Dick Babillis

Access 2003 SP2 running on Windows Server 2003 SP2

Call to TableExport routine to export Access table as text file
Relevant lines of code are:

Public Sub TableExport(sTable As String)
sTxt = "C:\PeopleA\Export\tblLabels.txt"
DoCmd.TransferText acExportDelim, , sTable, sTxt, True

On SOME machines at this location I get the error message:

Run-time error '3011': The Microsoft Jet database engine could not find the
object 'tblLabels#txt' ... Note . changed to #

On other machines, call works without issue

Seems like situation arose only within last 4-6 weeks

Any insight would be appreciated. Thank you.
 
P

pietlinden

Access 2003 SP2 running on Windows Server 2003 SP2

Call to TableExport routine to export Access table as text file
Relevant lines of code are:

Public Sub TableExport(sTable As String)
   sTxt = "C:\PeopleA\Export\tblLabels.txt"
   DoCmd.TransferText acExportDelim, , sTable, sTxt, True

On SOME machines at this location I get the error message:

Run-time error '3011':  The Microsoft Jet database engine could not find the
object 'tblLabels#txt' ...  Note . changed to #

On other machines, call works without issue

Seems like situation arose only within last 4-6 weeks

Any insight would be appreciated.  Thank you.

that's weird. I would try something like the standard...
1. export all objects in the database to a new blank database.
2. Open a code module and reset all the necessary references
3. compile the VBA modules.
4. test.

What happens if you do that? I would try the standard easy fix before
trying to figure out what's going on. If the easy fix solves it, no
need to go further.
 
D

david

Yes, it does that: No, that is not what your problem is.

dot/period has a special meaning in JET SQL, so it is
shown as #. If you really have a # in your file name you
are in trouble, so avoid that. If you really have a database
called tblLabels with a table called txt, write it like this
[tblLabels].[txt] :~) but I'm sure that is not what you meant.

You have to look again to see what the real problem is.
What directory are you exporting to? Is it there? Does
it have spaces in the directory path? The # is not the problem.

(david)
 

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