Access quitting on DoCmd.OpenReport (1 Viewer)

pottera

Registered User.
Local time
Today, 23:07
Joined
Sep 3, 2002
Messages
236
My Access 2002 application is quitting when I use the DoCmd.OpenReport command with - Access has encountered a problem and needs to close (or something similar).

The scenario is - I have a series of subforms which each contain a listbox, user right clicks on an item in listbox and uses shortcut menu to print. Calls a function which determines which subform it was called from and prints appropriate record - record prints okay but access consistently quits. Use the same code for print preview and that works okay.

Anyone have any thoughts on what the problem is? Don't appear to have any problems with other applications.

Thanks in advance...
 

WayneRyan

AWF VIP
Local time
Today, 14:07
Joined
Nov 19, 2002
Messages
7,122
Peter,

Have you tried a compact/repair? Access does go "brain dead"
sometimes.

Also you could try importing a backup copy of the report into
Access.

Wayne
 

pottera

Registered User.
Local time
Today, 23:07
Joined
Sep 3, 2002
Messages
236
Wayne, neither the Compact/Repair or importing reports worked. Ended up fixing most of the problem by creating new reports by copying and pasting and removing printing by the shortcut menu.

My database is obviously pretty screwed as one of my forms (which worked okay earlier) is not recognising its controls. When I follow the build ... into code from the form, I end up in the code for a report. Tried deleting the report but it just took me to another.

I will continue to go through the process of importing from backup and/or recreating as needed, but this is a big job.

Any thoughts on this?

thanks in advance and for response to date.
 

WayneRyan

AWF VIP
Local time
Today, 14:07
Joined
Nov 19, 2002
Messages
7,122
Peter,

When things go completely screwy, why not try making a new
empty database and importing everything into it. This helps
sometimes.

Wayne
 

Users who are viewing this thread

Top Bottom