Avatar of WSIT
WSIT
 asked on

Access 2007 Report Crash with acViewPreview

Hi

I've got a client who's Access 2007 keeps crashing when trying to produce a report. I haven't been able to tie down the exact line of code that causes the crash.  What I have noticed is that if I change the line of code that opens the reports from:

DoCmd.OpenReport FileName, acViewPreview

to

DoCmd.OpenReport FileName, acViewReport

then the report displays onscreen correctly.

I've removed all the printers and their drivers except for the MS PS Document Writer with no effect.

Any ideas/suggestions?
Microsoft Access

Avatar of undefined
Last Comment
Rey Obrero (Capricorn1)

8/22/2022 - Mon
Rey Obrero (Capricorn1)

have you done a compact and repair of the db?
then from VBA window, do
Debug >compile

correct any errors raised
WSIT

ASKER
Yes, I have done both.  No errors were raised.
Rey Obrero (Capricorn1)

does this happen to all reports?
Your help has saved me hundreds of hours of internet surfing.
fblack61
WSIT

ASKER
No, it doesn't happen to all reports.  I've been trying to step through the code in the design of the reports but instead of crashing I get an error 2486 instead.
Jeffrey Coachman

Please clearly define what you are calling a "Crash"
A crash will likely lock up the entire application...

Or are you just getting an error message...?
WSIT

ASKER
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Rey Obrero (Capricorn1)

then, the report that is causing the problem could be corrupted.

try creating a new report
WSIT

ASKER
I've tried that.  But still the same problem.  I've also tried it on a different PC and everything is fine :(
Rey Obrero (Capricorn1)

< I've also tried it on a different PC and everything is fine >

does your PC have the same Office installation as the other PC?

try uninstall Office then, reboot and reinstall office
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
WSIT

ASKER
No, I am using Access 2010 and the client is using Access 2007.  I will see if they are prepared to re-install 2007.
Dale Fye

Is there any code in any of the Reports events?  In Access 2007 and beyond, you have several different views.  The Report view is the default, and many of the Report Events do not fire when the report is opened in the Report view, but do fire in the Preview view.

It could be that there is some code that is causing the problem.  Will the application compile properly on the 2007 machine?
Jeffrey Coachman

WSIT,

You have two great Experts working with you here...

So, I'll step aside to avoid confusion.

;-)

Jeff
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
WSIT

ASKER
The code compiles with no errors.

Unfortunately I don't have access to the PC that is causing the error for the next few weeks
ASKER CERTIFIED SOLUTION
Rey Obrero (Capricorn1)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question