I found a Microsoft BUG. Exporting snapshot.

RussellTreacy

New member
Local time
Today, 10:25
Joined
Oct 5, 2008
Messages
3
Hi Everyone.
Problem: When outputting Snapshot file, access does not run report code in events such as oncurrent/onload etc etc. This is happening to me on access 2007 only.



Outputting a snapshot using......

DoCmd.OutputTo acOutputReport, RptName, "SnapshotFormat(*.snp)", _
strPathandFileName
DoEvents


OR even by a macro and I get this problem....

It is not running the code in the oncurrent/onload etc events which i have code in that does stuff as u can guess.

If I export it as html / text / xml it works fine.
If I preview/layout report it works fine.

I can even put buggy code into the onload events and nothing happens when outputting to snapshot.

This has to be a bug, tried telling microsoft, but they wanted €75.00 for me to do so.

:(

Any ideas anyone? Anyone have a support account that they can make these garden knomes aware of this issue???
 
Last edited:
Hi Russell,

The new report layout view in Access 2007--I think that's what they call it--does not run any code associated with the report's class module. Is this the view that you might have used?

In addition, is your database in a trusted folder?

Dealing With The Trust Center
http://www.accessmvp.com/TWickerath/articles/trust.htm
 
Thanks for reply.
Yes the database is in the trusted folder and other code works fine.
The report code works fine in 'preview', 'layout, 'print first 10 records', outputting to html/text/xml etc. Just snapshot. Weird eh?

 
Just a suggestion...Did you install Office 2007 SP1?
 
Please show the entire procedure that you are using.

Do you have any On Error Resume Next statements in this procedure? If so, comment these out and try running the code again.

Have you tried adding similar code to output to a Snapshot file in the Northwind sample database? Does this work okay, or does it result in the same symptom?
 
Hi,

I can repeat this issue in Northwind, so I will explain steps:

Steps:
1) Added this code to the on load event of report named "Customer Address Book"

Private Sub Report_Load()
MsgBox ("Hello")
End Sub
2) Call OutputTo from a form's code or macro or whatever using something like this... (i.e. exporting with out opening the preview)
Action: Arguments:
OutputTo Report, Customer Address Book, , , No, , 0,

3) Run macro/code and you get these results.
- Select text file/ html / xml etc. and you get your hello message.
- Select Snapshot and you get nothing. Zilch. How annoying.

Notes:-
You can get the event to work correctly outputting the snapshot if you preview the file first and then export it but thats no use, as i just want to export it with out opening it. Nice workaround, but dont want to do it.

Can anyone repeat this???

My access version is: (12.0.6211.1000) SP1 MSO (12.0.6320.5000)

Thanks for your help!
 

Users who are viewing this thread

Back
Top Bottom