function interrruptmessage() if messagebox("İf you want to stop the query, press 'OK', orherwise to continue press 'Cancel' button.", 1+32)=1 messagebox("Query cancelled.", 0+16) else wait window "Query is go on." nowait && NB : Will restart query RETRY endif RETURN ENDFUNC <pre> HTH, Viv >When pressed to ESC button, at the runtime, "cancel" command terminates the application and control returns to Windows. >But I want to stop the query only not application. > >How can I solve this problem. > >thanks in advance. > > > ><PRE> >&SqlCommand = "select * from customer where pkod like "5% into cursor curCustomer" > >set Escape on >ON ESCAPE DO interrruptmessage >&SqlCommand && select * from >set Escape &cEscState > >>
> >function interrruptmessage() > >if messagebox("İf you want to stop the query, press 'OK', orherwise to continue press 'Cancel' button.", 1+32)=1 > messagebox("Query cancelled.", 0+16) > cancel > return .F. >else > wait window "Query is go on." nowait >endif > >ENDFUNC > >