Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form has cancel button, need to check it during long query..

Status
Not open for further replies.

christheprogrammer

Programmer
Jul 10, 2000
258
CA
Hi All,
I remember there being a command to check the command buttons on a form during vigorous computations so that the user can easily cancel the procedure without pressing ctrl-break (and being dumped into debug mode).

For example:

Do while 1
'do lots of work here
if cancel_button_status()=pressed then
exit function
loop

I know this is ugly pseudocode but it's been a long day :)
Hopefully this makes sense and someone knows this command..

Thanks Chris
grandin1@yahoo.com
 
i think it goes like this:

Do while 1

'do lots of work here
DoEvents
exit function
loop
 
Thanks you very much, that was the function I was looking for!
Cheers Chris
grandin1@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top