M
Michael Daly
I have created a program to print individual member
reports of one page per member. My program creates a query
for each member in the list, then sends that report to the
printer. The code is as follows:
While Not Rst.EOF
DoEvents
CreateQryMemberResults (MemberId) ' Create new query.
DoCmd.OpenReport stDocName, acViewNormal
Rst.MoveNext
Wend
This works okay, but each time it executes the
DoCmd.OpenReport line of the code it opens and displays a
msgbox with a [Cancel] button. If I press this button it
only cancels that one report, and not break out of my
While... Wend loop. How can I trap if a user presses the
[Cancel] button on the OpenReport msgbox, and cancel all
further processing of the While... Wend loop?
Alternatively, can I suppress the displaying of the
OpenReport msgbox, and display my own form with a status
of what is printing, and control when a [Cancel] button is
clicked?
p.s. I'm using Access 97. Are the above problems fixable
with Access 97, or would a newer version of Access (say
2000) have features to achieve the above if it can fix the
problem?
Thanks for your assistance.
reports of one page per member. My program creates a query
for each member in the list, then sends that report to the
printer. The code is as follows:
While Not Rst.EOF
DoEvents
CreateQryMemberResults (MemberId) ' Create new query.
DoCmd.OpenReport stDocName, acViewNormal
Rst.MoveNext
Wend
This works okay, but each time it executes the
DoCmd.OpenReport line of the code it opens and displays a
msgbox with a [Cancel] button. If I press this button it
only cancels that one report, and not break out of my
While... Wend loop. How can I trap if a user presses the
[Cancel] button on the OpenReport msgbox, and cancel all
further processing of the While... Wend loop?
Alternatively, can I suppress the displaying of the
OpenReport msgbox, and display my own form with a status
of what is printing, and control when a [Cancel] button is
clicked?
p.s. I'm using Access 97. Are the above problems fixable
with Access 97, or would a newer version of Access (say
2000) have features to achieve the above if it can fix the
problem?
Thanks for your assistance.