Output Query Results to a Text File

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is my first macro, so be sensitive! I am attempting to create a macro
that opens and runs a query, exporting the results to a text file. It runs
fine until the export step where I get the global message "Access can't save
the output data to the file you've selected. I've been through all of the
help files the seem to pertain, but nothing is registering. Here is the
macro:

Action
OpenQuery Extract Teachers, Datasheet, Read Only
OutputTo Query,,,c:\Eduphoria Teachers, Yes,,1,Print
Quit Save All
 
If the error message is to be believed, Access (or Windows) is having a
problem with a file you've named "C:\Eduphoria Teachers".

This could be because no such file exists, or there's no file extension
(e.g., ".txt"), or because there's a space in the filename, or ...

If this were mine, I'd try including an extension and losing the space.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top