TransferText Err 3044

  • Thread starter Thread starter David W. Fenton
  • Start date Start date
D

David W. Fenton

I have a really weird one. I'm working on converting a 1996-era
Access 2 app to Access 2003 (we put it off as long as we could!),
and this line is producing Err 3044:

DoCmd.TransferText acExportFixed, "GroveOutput", _
"tmpGroveOutput", STR_QUOTE & strFilename & STR_QUOTE, True

If I copy that line in break mode and run it in the immediate
window, it gives the verbal message followed by a non-verbose #3044
"undefined error".

If in the immediate window I change the variable to the literal
filename, it runs without a problem:

DoCmd.TransferText acExportFixed, "GroveOutput", "tmpGroveOutput",
_ "C:\Documents and
Settings\david.fenton\Desktop\DWF\DFAssoc\Rena\Liszt.txt", True

(I can't get rid of the word wrap -- there is no space between
"Rena" and "\Liszt.txt").

If in break mode, I test whether STR_QUOTE & strFilename & STR_QUOTE
is equal to the literal value, it tells me it is.

Any ideas on the solution? Why would passing the value in a variable
make a difference?

(I recreated the export spec, just in case that was part of the
problem, but it wasn't)
 
Try dropping the Str_Quote at the beginning and end and just pass in strFileName.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
Try dropping the Str_Quote at the beginning and end and just pass
in strFileName.

Well, that worked. Why? I thought I needed the quotes because of the
spaces in the file path?
 
I think that transferText takes care of any modifications needed to the
path string. I can't really say since I have no access to the code.
'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
Back
Top