Solved

Execution error

Posted on 2014-04-13
5
280 Views
Last Modified: 2014-04-16
Hi All

Another weird one from me.

I have an on delete procedure that if a condition is not met runs to END. Which is the only way I know to stop a procedure continuing. It works in the MDB and MDE but not when run under access runtime.

When run under access runtime I get "The execution of this application has stopped due to a runtime error" and then the only option is to shuts down

anybody got a clue why?
0
Comment
Question by:DatabaseDek
  • 2
  • 2
5 Comments
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
ID: 39997839
You'd have to show us the code. Generally something like that is caused by an unhandled error so first thing to do is add error handling to your procedure.
0
 

Author Comment

by:DatabaseDek
ID: 39998469
I will do that and respond

Thank you
0
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 250 total points
ID: 40000957
Change the END to Exit Sub or Exit Function.

/gustav
0
 

Author Comment

by:DatabaseDek
ID: 40001404
I got around it by using Cancel event. Is that OK? seems to work
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 40001448
If it works why not.

But what do you expect? You haven't revealed a single line of code.

/gustav
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question