Export report to txt without preview

Fishman

New member
Local time
Today, 12:14
Joined
Nov 26, 2008
Messages
6
Hi all, hope you can help.

I am trying to build a form with a command button which will allow me to build a report and export it to a text file without first previewing it.

I am using the Northwind db to try to get this working. I have built a form with a multi-select listbox to choose one or more cities from the Customers table, at the moment I have a button which uses these choices and builds and opens a report. I have done this by following all the code/instructions from this tutorial.
http://articles.techrepublic.com.com/5100-10878_11-6183674.html

It all works fine. However, when I role this out for real in my large database the report will be VERY big. So I do not want to (or indeed need to ) view the report before I then go on to export it to a text file.

Under the 'View Report' button that I already have on the form which I built following that tutorial, I want another button 'Save Report' which will not preview the report, but will instead bring up the export function usually got by using the File/Export option when viewing a report.

TBH I have no idea where to start with this :p
 
As you may well agree that the report is bound to an underlying query, it is that that you need to export to a text file, not the report itself. You have mentioned however what is going to happen to this text file once you have created it. Is some one else going to use it for something else? How is the user going to view it.

Reason for asking is that it will determine how the query is output, don't forget any formatting or grouping in the report will be lost.

The best way is to create a macro and use the OutputTo command.
 

Users who are viewing this thread

Back
Top Bottom