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)
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

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

correct any errors raised
Avatar of WSIT
WSIT

ASKER

Yes, I have done both.  No errors were raised.
does this happen to all reports?
Avatar of WSIT
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.
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...?
Avatar of WSIT
WSIT

ASKER

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

try creating a new report
Avatar of WSIT
WSIT

ASKER

I've tried that.  But still the same problem.  I've also tried it on a different PC and everything is fine :(
< 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
Avatar of WSIT
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.
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

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?
WSIT,

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

So, I'll step aside to avoid confusion.

;-)

Jeff
Avatar of WSIT
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
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo