Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / October 2007

Tip: Looking for answers? Try searching our database.

Output Query Results to a Text File

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
WileyW - 26 Oct 2007 21:32 GMT
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
Jeff Boyce - 26 Oct 2007 22:46 GMT
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

> This is my first macro, so be sensitive!  I am attempting to create a
> macro
[quoted text clipped - 10 lines]
> OutputTo        Query,,,c:\Eduphoria Teachers, Yes,,1,Print
> Quit                Save All
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.