Solved

Execution error

Posted on 2014-04-13
5
273 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

705 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now