473,804 Members | 5,054 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5508
-----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 AcOutputObjectT ype. The type of object to output.

AcOutputObjectT ype can be one of these AcOutputObjectT ype constants.
acOutputDataAcc essPage Not supported.
acOutputForm
acOutputFunctio n
acOutputModule
acOutputQuery
acOutputReport
acOutputServerV iew
acOutputStoredP rocedure
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:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)

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

iQA/AwUBQfbGcIechKq OuFEgEQJc8gCgvR KmCXfGb9FbdCEmQ dPHvV7vzkMAoIjU
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
1346
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 the employee that the report pertains to. The building of the report is a lengthy process. We would like to be able to save the resulting html along with the manager comments back to the server, rather than just saving the comments and...
1
1327
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 station ground I want to run the report for. I then publish the report to Word and then save it in a shared folder. I do this for each station ground (10 station grounds) and one for all
0
1431
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 will mirror my current situation. Scenario: I have 5 clients in my customer table. My goal:
18
3806
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 trouble. I have tried keeping some of the fields bound and when I use the save button it has been saving as 2 different records. This is unacceptable. This is what I have, can anyone help me out with this?
1
2434
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 entry page has main form with 9 sections (1 main section and 8 subsections). These subsections are all employed using subforms. These are all joined through the ProgramID. The Report is set up in a similar fashion with main and subreports too. ...
3
2473
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 Database I have about 6 to 7 reports that show me all the data from different tables. When I open any Report in 'Print Preview' Mode everything looks fine and the Reports open just fine. But once in a while, for some strange reason and I don't know why,...
3
2211
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 viewing them on other Vista computers. I have tried many things see Example: Open my report in Design mode. Select Page Setup. On the Page tab, alongside Use Specific Printer, press the Printer button. Having selected your printer, press Properties....
1
5845
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 a report filter screen, and whilst each report is being generated, it populates a memorystream/streamwriter. This has always been done this way but I am trying to update/improve and generally speed things up. The variables are declared as follows:...
6
8072
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 to change the Content- Type and Content-Disposition headers, and essentially print the same report, and it's done. That works fine. But in some reports on the web I need to show images. The web part is fine, but I'm having a tough time...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10577
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.