Access crashes

roypython

Registered User.
Local time
Tomorrow, 09:50
Joined
May 16, 2005
Messages
29
Hello.
Your help is very much appreciated.
I am using ACCESS 2002 (XP).
I have two access files - one program (with link tables) and the other one is the database.
I created ACCESS report.
When opening the report for viewing - it's all good.(
DoCmd.OpenReport "_rptDetails", acViewPreview
)
When trying to save the report to a file - Access saves it to a file and immidiately crashes.
(
stDocName = "_rptDetails"
DoCmd.OutputTo acReport, stDocName
)
when printing - it prints and crashes
(
stDocName = "_rptDetails"
DoCmd.OpenReport stDocName, acNormal
)
I tried:
1. To make the data source of the report a table instead of a query.
2. Complied the code again.
3. Copied everything into a new database.
4. Created a new report from scratch.

Nothing helps.

Would you have any idea of what causing the problem?

Thank you
Roy
 
Last edited:
try: DoCmd.OpenReport stDocName, acviewNormal

or just: DoCmd.OpenReport stDocName
 
When you say that Access crashes, this rarely happens without an error message of some sort.

Did it try to tell you anything? Was there a message box or dialog box that gave a reason?

Before you say NO, also look in your Event Viewer's Application log to see if there are any records there that might show why Access barfed. If we can see an error message, we might be able to advise you better.
 
thank you. that's a good suggestions.
The problem raised 2 application events in the event viewer.
1. source "Application error"
event id: 1000
type: error

Faulting application msaccess.exe, version 10.0.2616.0, faulting module msaccess.exe, version 10.0.2616.0, fault address 0x00035c14.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
000: 41 70 70 6c 69 63 61 74 Applicat
0008: 69 6f 6e 20 46 61 69 6c ion Fail
0010: 75 72 65 20 20 6d 73 61 ure msa
0018: 63 63 65 73 73 2e 65 78 ccess.ex
0020: 65 20 31 30 2e 30 2e 32 e 10.0.2
0028: 36 31 36 2e 30 20 69 6e 616.0 in
0030: 20 6d 73 61 63 63 65 73 msacces
0038: 73 2e 65 78 65 20 31 30 s.exe 10
0040: 2e 30 2e 32 36 31 36 2e .0.2616.
0048: 30 20 61 74 20 6f 66 66 0 at off
0050: 73 65 74 20 30 30 30 33 set 0003
0058: 35 63 31 34 0d 0a 5c14..

2.source: microsoft office 10
event id:1000

the memory dump is the same as above.



I tried to run it on different computers to negate problems associated with RAM and OS.
Still the same thing haapens.
 
I haven't checked this line but the syntax here looks odd, although it may not be

stDocName = "_rptDetails"
DoCmd.OutputTo acReport, stDocName

what is the report being output to ......

-------------
secondly, i'm not sure the constants are interchangeable, but as edtab says you have

docmd.openreport acnormal

but the correct constant is acVIEWnormal

(they may be the same value in fact, but this may be causing an error also)
 
thank you for your quick reply.
Printing the report using
DoCmd.OpenReport stDocName, acviewNormal prints the report but crashes access immidiately afterwards.

"OutputTo" method is used to save the report as file (which save the file and then crashes access as well)

I'll try replacing the Office 10 dll and see if it helps.
 
Last edited:
access crashes

The outputto syntax given is not complete.

try the following syntax for saving the file in snapshot format.

DoCmd.OutputTo acReport, "SourceFile", "SnapshotFormat(*.snp)", "d:\tmp\mySourceFile.snp", False, "", 0

You can open and print the file without problems too.
 

Users who are viewing this thread

Back
Top Bottom