We have an application which runs Access under automation.
With Access 97, the app included this line to send a report to a text
file:
myAccessObject.DoCmd.OutputTo acOutputReport, , acFormatTXT,
"sample.txt"
(The constant acOutputReport has the value of "MS-DOS Text (*.txt)".
There is no object name in the command because the report is open at
the time this line is executed.)
When Access 2000 came out, this line cause a "Method '~' of object '~'
failed" error.
After some trial and error, we came up with this syntax which works
with Access 2000:
myAccessObject.DoCmd.OutputTo acOutputReport, , "MS-DOS Text",
"sample.txt"
With Access 2002, the "Method '~' of object '~' failed" error has
returned (occurs with both of the above). We have been unsuccessful in
finding a syntax which works with this version of Access.
Any suggestions?