S
SimeonD
Hi
Using an ADP in Office 2003. I have a report which has 20 sub reports.
Normally, it works fine.
However, sometimes, the report won't print. There is not error message. The
status bar just show "Formatting report. Press Ctrl+Break to stop." The
progress bar fills all the way up, then nothing happens.
Each sub report relates to a Client Section, which can be turned on or off.
So what I'm doing is turning off each section until I find out which sub
report is the problem.
I don't understand why I don't get an error message. I have code in the top
level report
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo Err_Detail_Format
If Not SectionFormatComplete Then
FormatSection
SectionFormatComplete = True
End If
Exit_Detail_Format:
Exit Sub
Err_Detail_Format:
msgError ("Presentation - Format Detail")
Resume Exit_Detail_Format
End Sub
FormatSection is a procedure which makes the sub reports visible if the
corresponding Section is turned on.
I would have thought if there was an error in the sub report, it would jump
back to the error handling in the top level report. Unless, of course, there
was error handling in the sub report.
Eventually, I would find the error, usually some field isn't filled or
somesuch.Very time consuming however.
If I step through the code, I will find that the code just keeps looping
through the detail format of each sub report. If I open the sub report on
its own, I will get the error message then.
So I'm looking for two things:
1) A way of knowing which sub report is the issue. And get Access to give me
the error message.
2) Rather than Access locking up, I'd like to generate some kind of time out
message. Anyone got an idea of how I would do that?
Thanks
Simeon
Using an ADP in Office 2003. I have a report which has 20 sub reports.
Normally, it works fine.
However, sometimes, the report won't print. There is not error message. The
status bar just show "Formatting report. Press Ctrl+Break to stop." The
progress bar fills all the way up, then nothing happens.
Each sub report relates to a Client Section, which can be turned on or off.
So what I'm doing is turning off each section until I find out which sub
report is the problem.
I don't understand why I don't get an error message. I have code in the top
level report
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo Err_Detail_Format
If Not SectionFormatComplete Then
FormatSection
SectionFormatComplete = True
End If
Exit_Detail_Format:
Exit Sub
Err_Detail_Format:
msgError ("Presentation - Format Detail")
Resume Exit_Detail_Format
End Sub
FormatSection is a procedure which makes the sub reports visible if the
corresponding Section is turned on.
I would have thought if there was an error in the sub report, it would jump
back to the error handling in the top level report. Unless, of course, there
was error handling in the sub report.
Eventually, I would find the error, usually some field isn't filled or
somesuch.Very time consuming however.
If I step through the code, I will find that the code just keeps looping
through the detail format of each sub report. If I open the sub report on
its own, I will get the error message then.
So I'm looking for two things:
1) A way of knowing which sub report is the issue. And get Access to give me
the error message.
2) Rather than Access locking up, I'd like to generate some kind of time out
message. Anyone got an idea of how I would do that?
Thanks
Simeon