Transfer Text and Windows Vista

T

Tom Ventouris

I have been transferring text to a .txt file from an application designed in
A2007 on Windows XP.
It run as expected:
DoCmd.TransferText acExportFixed, _
"ExportSpec01", "qryExportQuery", _
"C:\DataExport\DataFile01.txt", False, ""

When I run the same code on my Vista Buisness PC, I get Error 3011...."could
not find the object 'DataFile01'. Make sure it exists or the....."

I test the path by creating the txt file manually and openining it from the
application, this works fine with Application.Followhyperlink. (The file is
being found)

Any ideas. I am assuming this must be related to the operating system, since
it works fine on XP.
 
P

Paul Shapiro

Tom Ventouris said:
I have been transferring text to a .txt file from an application designed
in
A2007 on Windows XP.
It run as expected:
DoCmd.TransferText acExportFixed, _
"ExportSpec01", "qryExportQuery", _
"C:\DataExport\DataFile01.txt", False, ""

When I run the same code on my Vista Buisness PC, I get Error
3011...."could
not find the object 'DataFile01'. Make sure it exists or the....."

I test the path by creating the txt file manually and openining it from
the
application, this works fine with Application.Followhyperlink. (The file
is
being found)

Any ideas. I am assuming this must be related to the operating system,
since
it works fine on XP.
Does the user account running the code have full permissions on the
C:\DataExport folder? If it's a security problem you might find a more
specific error in the security (or application or system) event log.
 
T

Tom Ventouris

Thanks for the response.
The User has full permissions.
I am also using code to create folders from the application in the same
C:\Data folder, and this works.
 
P

Paul Shapiro

That seems odd. Nothing in the event logs? I've regularly output data files
(delimited, not fixed, but I can't imagine that matters) in Vista and
Windows 7 without experiencing that kind of error, and nothing has been
reported by clients either. Any missing references in the application on the
new computer? Does the code compile successfully? The error message sounds a
bit odd for outputting to a file. Does the query run ok? What if you
temporarily open a recordset with the query instead of outputting to a file?
 
T

Tom Ventouris

It does seem odd.
The query runs ok. In fact I can export the query mannualy.
I get the same error when I try acExportDelim
If I copy and paste the entire application (Fe and Be) onto a PC running
A2007 and Windows Xp, the code works.
 
T

Tom Ventouris

After further checks:
I have another application (2) on the VISTA PC which uses the same export
code. This works on the VISTA PC.
I copied the code into the application in which I am experiencing the
problem and it does not work.

Same code in two applications. Works in one but not the other.
The export specs are the same.
Any ideas after thsi update? It seems the problem is in the new application.
Thanks in advance.
 

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