Solved

Execution error

Posted on 2014-04-13
5
282 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 85

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 51

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 51

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

623 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