Create a Cancel Button to Halt an operation

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tony_VBACoder (anonymous_at_discussions.microsoft.com)
Date: 07/28/04


Date: Wed, 28 Jul 2004 08:33:35 -0700

With Access 2000 or 2002, I am looking for a method to
create a Cancel button on some form, that when clicked,
would stop the execution of a Query.

I have an Entry Form where a user can enter certain
criteria and when the user clicks the OK button, a bunch
of queries run (some are Update Queries and others are
Delete Queries). While the process is running, I load
a "Please Wait" form that displays the progress to the
user. This is the form that I would like to add
a "Cancel" button, where when pressed, will halt the
execution of the Query that is being run. It appears that
when I issue a SQL statement via the DoCmd.RunSQL "DELETE
* FROM tbl1" or issue the DoCmd.OpenQuery "qryDelete", my
code halts until the query has finished, then the next
line of code runs.



Relevant Pages

  • Re: Parent/Child Relationship to Integrate Data in Reports
    ... I am working on updating my queries but am confident ... On the code to cancel the before update ... Create a query joining the projects and expenses tables. ... Join ProjectID from one table to ParentProjectID in the other. ...
    (microsoft.public.access.reports)
  • Re: Problem with outer join - Invalid operation (Error 3219) !?
    ... Before I felt sure that the order of nesting of queries in Jet ... problematic query, then error 3219 disappears. ... parenthesis to indicate the order of execution, ... add the third table to complete the query with the second outer join. ...
    (microsoft.public.access.queries)
  • Re: [Info-Ingres] Insert performance (was "Sun buys MySQL")
    ... Queries are presented at the DBMS server via different GCA messages ... dynamic SQL and cursors defined in dynamic SQL. ... query plan and discards the query source. ... execution plan as the plan is executed. ...
    (comp.databases.ingres)
  • Re: Last 12 months query..
    ... Thanks Aaron for clarifying. ... queries are executed thousands of times a day, ... query, and frequency of execution. ...
    (microsoft.public.sqlserver.programming)
  • Re: Cancelling an ADO Command takes too long
    ... I know Oracle is ... that's how most of our clients cancel runaway queries now. ... query didn't join two tables correctly. ...
    (borland.public.delphi.database.ado)