473,405 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Problems Saving A Report

I'm trying to save a report as a snapshot. If I use this code:

DoCmd.OutputTo acOutputReport, "Snapshot Format (*.snp)", , False

everything works fine, the file save dialogue box appears and the
"Report's Name.snp" is entered as the file name to be saved and the
file can be saved to the specified location.

If however I try to give the report a different name by entering an
object name like this:

DoCmd.OutputTo acOutputReport, "Test", "Snapshot Format (*.snp)", ,
False

the file save dialogue box appears, "Test.snp" is entered as the file
name to be saved, but the file won't actually save. The file save
dialogue box disappears, but the file isn't saved to the specified
location.

Is this a bug or am I missing something. Any help would be greatly
appreciated.

Nov 13 '05 #1
1 5463
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You're not using the OutputTo parameters correctly. The OutputFile name
is the 4th parameter, not the 2nd. The following is the correct syntax
for the OutputTo function:

DoCmd.OutputTo(ObjectType, ObjectName, OutputFormat, OutputFile,
AutoStart, TemplateFile, Encoding)

Here are the Access Help article's info on the parameters:

== begin quote ==
ObjectType Required AcOutputObjectType. The type of object to output.

AcOutputObjectType can be one of these AcOutputObjectType constants.
acOutputDataAccessPage Not supported.
acOutputForm
acOutputFunction
acOutputModule
acOutputQuery
acOutputReport
acOutputServerView
acOutputStoredProcedure
acOutputTable

ObjectName Optional Variant. A string expression that's the valid name
of an object of the type selected by the ObjectType argument. If you
want to output the active object, specify the object's type for the
ObjectType argument and leave this argument blank. If you run Visual
Basic code containing the OutputTo method in a library database,
Microsoft Access looks for the object with this name, first in the
library database, then in the current database.

OutputFormat Optional Variant. The output format, expressed as an
AcFormat constant. If you omit this argument, Microsoft Access prompts
you for the output format.

AcFormat can be one of these AcFormat constants.
acFormatASP
acFormatDAP
acFormatHTML
acFormatIIS
acFormatRTF
acFormatSNP
acFormatTXT
acFormatXLS

OutputFile Optional Variant. A string expression that's the full name,
including the path, of the file you want to output the object to. If you
leave this argument blank, Microsoft Access prompts you for an output
file name.

AutoStart Optional Variant. Use True (–1) to start the appropriate
Microsoft Windows–based application immediately, with the file specified
by the OutputFile argument loaded. Use False (0) if you don't want to
start the application. This argument is ignored for Microsoft Internet
Information Server (.htx, .idc) files and Microsoft ActiveX Server
(*.asp) files. If you leave this argument blank, the default (False) is
assumed.

TemplateFile Optional Variant. A string expression that's the full
name, including the path, of the file you want to use as a template for
an HTML, HTX, or ASP file.

Encoding Optional Variant.
== end quote ==

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQfbGcIechKqOuFEgEQJc8gCgvRKmCXfGb9FbdCEmQdPHvV 7vzkMAoIjU
8Flzj3eLS1oO/ZDnR/hAOE0Z
=rrUL
-----END PGP SIGNATURE-----
Wayne wrote:
I'm trying to save a report as a snapshot. If I use this code:

DoCmd.OutputTo acOutputReport, "Snapshot Format (*.snp)", , False

everything works fine, the file save dialogue box appears and the
"Report's Name.snp" is entered as the file name to be saved and the
file can be saved to the specified location.

If however I try to give the report a different name by entering an
object name like this:

DoCmd.OutputTo acOutputReport, "Test", "Snapshot Format (*.snp)", ,
False

the file save dialogue box appears, "Test.snp" is entered as the file
name to be saved, but the file won't actually save. The file save
dialogue box disappears, but the file isn't saved to the specified
location.

Is this a bug or am I missing something. Any help would be greatly
appreciated.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob Murdoch | last post by:
We have an asp application that creates reports from a database. The managers would like to create the report, view the results, add a comment, and save the report so that he can send a link to...
1
by: Kirsty Ryder | last post by:
Hi, I'm not sure whether I'm being silly and its really obvious, or whether I'm being over-ambitious. At the end of each month I run a report. A pop up dialog box prompts for the dates and...
0
by: soberhi | last post by:
I am new to Access (and Access programming) so kindly be gentle. I did try to search around before asking this question. I am simplifying my problem in the hopes that this scaled down version...
18
by: TORQUE | last post by:
Hi, Im wondering if anyone can help me with a problem. I have a form with more than 50 unbound fields. Some of the fields will be blank from time to time. This seems to be where im having...
1
by: natwong | last post by:
Hi All, I'm hoping that someone could help me out since I'm new with Access. Background: Database was set up as a simple data entry and reporting tool for Program Initiatives. The data...
3
by: k2storm | last post by:
I'm having problems with Reports and I'm seeking some help, or advice on how to solve this problem. Any help will be much appriciated! It’s hard to explain but I will try to do my best: In my...
3
by: RobEveryThingIsPossible | last post by:
IN VISTA MS Access 2000 Printer Settings Not Saving With Vista Bus. The printer settings (Label or Env.) keep on change back to another setting after saving them on a report or form, when...
1
by: MSwanston | last post by:
Hi I need some help with saving retreiving data from the cache, and how best to structure my code. FYI am working in VS2005/under .NET2 Framework. Ok, we have a series of reports that get run via...
6
by: Eddie | last post by:
Hi all, I am displaying a number of reports, and giving the users an option to display them on the web or download them to Excel. If they want the Excel file, I just use the PHP header command...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.