cancle run during running program

I

icccapital

I have an access form that the user clicks to print a bunch of documents.
Within the vba code there is a while loop that goes through all of the
clients and prints the report one by one calling docmd.openreport.

1)You can see below what I have done by adding a cancel button, but when the
action starts, another form is brought on top of this one so the user can't
see the form or the cancel button to cancel the action.

2) I wanted to give the user the ability to cancel the print before going
through all the clients if need be. So I added a cancel button to the form
and added the doevents function and then check if cancel = true. I don't
know if this is the right way to do it because of the problem above.

Please help with either or both of these issues if you see problems with the
logic. thank you.
 

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