Open Report was Cancelled (but not everywhere)

G

Gordon Jones

I have a church accounting program developed on Access 2002 with over 100
different churches using it. It is distributed as cbw5.mde, and the tables
are cbw5_be.mdb. About half of the users have Access 2002 or later, and the
others have Runtime Access 2002. One of the major functions is the
production of quarterly/annual statements of donations. The two most
frequently used are for “All Donors†and “Individual Donorâ€. I develop and
test on an up-to-date XP system with up-to-date Office XP Professional with
Front Page. In the program, I have a “Report Selector†using
“DoCmd.OpenReport stDocName, acViewPreview.†which allows the user to select
one of about 12 classifications of reports; he then selects from a list of
reports in that class by title and description; this selection puts the
report name in stDocName.

Suddenly I have had 4 churches using Access 2002 or Runtime 2002 report
having problems with creating the “reports†for the All Donors/Individual
Donor statements in that after making the selections and clicking the button
for either preview or print, they get a message “The Open Report was
cancelled.†( I have noted prior reports about this being caused by Default
Printer problems. These users have told me they haven’t installed new
printers or changed the defaults….)

Within the code for these reports there are 3 subroutines:
..Detail_Format(Cancel As Integer, FormatCount As Integer)
..PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
..Report_Open(Cancel As Integer)

Detail Format checks to see if a variable has been provided with the Title
and Name of the person who is to sign the statements. If so, the variables
for the statement are made visible, otherwise not visible. Nothing assigns a
value to Cancel.

PageHeaderSection_Format substitutes an Alternate Address for the normal
address, and provides for 3 or 4 line address spacing. Nothing assigns a
value to Cancel.

Report_Open checks to see if the donating family has any donations for the
year-to-date and sets internal switches. Nothing assigns a value to Cancel.

When I have the churches send me a copy of their data tables, I do not get
the “The Open Report was Cancelled†message, and can create the requested
report. I can also export it to Word, zip it, and send it back to the
affected churches. This means that I cannot trap the error perceived by
their systems. I have tried sending a .mdb copy of the program to one of the
churches which has Access 2002, but that turns into a real taffy pull because
of error messages even in getting the program to run because of such things
as “missing mscomct2.ocxâ€.

Can anyone offer any suggestions on either background Access functions that
are involved, or other ways to isolate the problem?

Thanks,
 
G

Gordon Jones

Your statement that this can be hard to troubleshoot is the understatement of
the year. I chased all references to 2501, and all I derived from that was
that there is a high correlation between this problem and default printers.
I inserted the following code into my btnPreview subroutine:

const ReportCancelled = 2501
..
..
Select Case Err.Number
Case 0
' no error so do nothing
Case ReportCancelled
' anticipated error so do nothing
Case Else
' unknown error so inform user
MsgBox Err.Description, vbExclamation, "Error"
End Select

This had no effect on my own machines (which don't have the problem), but
when tested on a couple of my users' machines who have been having the
problem, instead of giving them the "report cancelled..." error message, it
just froze the system and required ctl+alt+del to get out of it. I then had
one of them try printing a report that had previously had no trouble
printing, and that also froze. I then had her switch the default to another
printer, and it worked o.k., but the 'statement' report still hangs up.

Since this is the only program that is giving them this problem, it is hard
to just tell them that the problem is with the default printer and they shoud
fix it. It obviously has an origin in the Access code, and I need to find
out how to fix it.

Any ideas would be greatly appreciated.

Gordon Jones
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top