Hi All,
I have an application which runs in a loop, processing data from a database and updating a progress bar. I have used to DoEvents command to allow a cancel button to pressed to cancel the operation if it is taking too long.
It the btn_cancel even I ask the user if they wish to cancel and if they select yes then I wish to unload the current form using Unload Me. What I am finding though is the code still returns to the loop and continues trying to read from the (now closed) database. Is there anyway I can prevent this happening?
Thanks
Andrew
I have an application which runs in a loop, processing data from a database and updating a progress bar. I have used to DoEvents command to allow a cancel button to pressed to cancel the operation if it is taking too long.
It the btn_cancel even I ask the user if they wish to cancel and if they select yes then I wish to unload the current form using Unload Me. What I am finding though is the code still returns to the loop and continues trying to read from the (now closed) database. Is there anyway I can prevent this happening?
Thanks
Andrew