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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I stop a running query?

Status
Not open for further replies.

AlexmacG

Technical User
Jan 16, 2003
50
GB
I have a VBA function that is used in a query. The function is self validating using data entered on a form.

When validation fails I inform the user or take appropriate action.

This all works fine from code but if a user runs the query [e.g. from the query design mode], if there is a validation failure, I wish to stop the query running automatically.

This is important as the query can take a long time to run and might be started by a user ( not from the code) to run overnight and validation issues might not be located till user is tucked up in bed!

Please Note: There are other reasons why I do not really wish to control running code/macros from a switchboard, as well as wishing to run from the run button during design and test of the database/query.

Can this [stop/cancel] of the running query be done from code so that I can take other code action or stop altogether?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top