Tracy
asked on
Prevent users from stopping queries to import data in Access
Hi All,
I have an Access 2010 database that is split. When it is launched in the morning, it checks to see if new data has been imported for the day, if not it runs a few queries, using DoCmd.OpenQuery to import the data. The problem I'm having is that the users are pressing and holding escape to stop the import from happening.
How can I prevent them from stopping the import when they press and hold escape?
Thanks,
Tracy
I have an Access 2010 database that is split. When it is launched in the morning, it checks to see if new data has been imported for the day, if not it runs a few queries, using DoCmd.OpenQuery to import the data. The problem I'm having is that the users are pressing and holding escape to stop the import from happening.
How can I prevent them from stopping the import when they press and hold escape?
Thanks,
Tracy
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much!
you're welcome ~ happy to help
ASKER
With Rey's, if I click escape to cancel the import, it will capture the errors below (am I missing any?) and then I can handle them as needed.
error 3059 - operation canceled by user
error 2501 - the openquery action was canceled
With Crystal's, I had to move some code around, because if I hold escape for long enough (ie, continue holding after it's set back to true in the code), I get an error saying an object is not available (it's trying to refresh a subform on the main form which is launched from the splash form).
Thanks a lot!