cQryStr = "select * from customer where name like 'A%'" cEscState = set("escape") set Escape on ON ESCAPE DO interrruptmessage &cQryStr set Escape &cEscState ***** procedure interrruptmessage() if messagebox("To stop the query press 'OK', to continue press 'Cancel' button.", 1+32)=1 messagebox("Query cancelled", 0+16) cancel return .F. else wait window "Query is continuing." nowait endif return .F. ENDPROC