Solved

Execution of this application has stopped due to a run-time error.

Posted on 2003-11-07
10
9,530 Views
Last Modified: 2011-04-03
Hi,
I developed an application with access and when I tried to deploy the application with the access runtime it gives me the following error:

"Execution of this application has stopped due to a run-time error"
"The application can't continue an it will shut down."

I look in the EE database and I try some of those solutions and it didn't work. I reinstall the Developer package and the entire Office as well. Also Microsoft says that it might be a problem if there are difference between the MDAC components from the original computer where you developed and the computer where you want to run the application, I tried using the same MDAC, but didn't help neither, this seems to be another Microsoft bug.

Any ideas or work arround for this ?

Thanks,
0
Comment
Question by:Mylor
10 Comments
 
LVL 39

Expert Comment

by:stevbe
ID: 9703091
Does the runtime version work on your machine?

You need to put error handling on whatever is running on startup (you should put it on EVERYTHING) so you can find out what is really going wrong.

Steve
0
 

Author Comment

by:Mylor
ID: 9703132
I run the program in my computer with the runtime and I get the same error.
0
 
LVL 39

Expert Comment

by:stevbe
ID: 9703184
does the original mdb file work on your computer?
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 4

Expert Comment

by:inox
ID: 9703843

assuming you used adt or ode, this can happen:

- When you use an ActiveX control in a Microsoft Access application, the control may appear blank when the application is used in the run-time environment

- If you use the End statement in Visual Basic for Applications    
  code in a run-time application i.e:
  Sub CauseError()
   On Error GoTo Err_Handler
    MsgBox "Click OK to cause a run-time error"
    End
    Exit Sub
    Err_Handler:
    MsgBox Error$
  End Sub

- When you add a switchboard item to close a run-time application

and some other things


0
 

Accepted Solution

by:
Mylor earned 0 total points
ID: 9717612
Thank you all, I called Microsoft and I send them the code; the problem was that some functions and code is not available in runtime mode, so, when you program in Access and deploy the application you have to be really carefull with your code.

This was the example (a File Dialog Box):

With _
Application.FileDialog(conFileDialogFilePicker)

        .ButtonName = "Select"
        Debug.Print "DialogType: " & .DialogType
        .Title = "Choose your files"
        .Filters.Clear
                .InitialFileName = txtOutputPath
                .Filters.Add "All Files", "*.*", 1
                .Filters.Add "Access databases", "*.mdb; *.mde", 2
                .Filters.Add "Excel Files", "*.xl?", 3
                .Filters.Add "Word Files", "*.doc", 4
                .FilterIndex = 3

        .InitialView = msoFileDialogViewDetails
        .Show

        If .SelectedItems.Count > 0 Then
                For Each varItem In .SelectedItems
                    strOut = strOut & varItem & vbCrLf
                Next varItem
        End If

End With

Thanks,
0
 
LVL 39

Expert Comment

by:stevbe
ID: 9721524
You could have saved the call to Microsoft if you had error handling which would have identified the code causing the problem. We would have been able to help you find an alternative solution which in this case you can use the Win32 api function found at http://www.mvps.org/access/api/api0001.htm to provide a file dialog box in an Access runtime application.

Steve
0
 

Author Comment

by:Mylor
ID: 9724493
Thanks Steve
0
 

Expert Comment

by:woodsbw
ID: 35309770
I am experiencing the same "execution of this application has stopped due to a run-time error". The database is very simple with one table and three forms. With Access 2010 Run-time installed on an WinXP/SP3 machine the application runs on multiple mahcines except one machine. This one troublesome machine provides the error. I even went so far as to completely rebuild the machine from scratch (can't golf yet). The error still persists.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

786 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