Share via

Access Runtime Install Error

Anonymous
2012-04-28T05:48:46+00:00

I have an Access Database I would like to distribute. The computer used to build this is running Windows 7 Professional 64-bit and using Access 2007.

The computer I'm trying to install the application on first is a laptop running Windows 7 Home Edition 32-bit and it has Office 2003.

I have carefully followed the instructions in "Deploying Access 2007 Runtime-Based Solutions" while going through the Package Solution Wizard to buid the "package" for installation.

Installing the package SEEMS to go smoothly. I am told the Installation is Successful. I have a lovely icon on my laptop desktop, but when the program opens, even though I can see my switchboard, a message box quickly pops up announcing:

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

The only options are an "OK" button or the X in the upper right corner to close the window, which also closes the program.

I am able to uninstall using the Uninstall wizard in the Control Panel. I am able to go into the Windows Explorer and delete the Runtime that was installed.

Any clues as to the real problem? The message box isn't very helpful.

Thank you in advance for any help you can give me.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
2012-05-04T01:46:31+00:00

Yes, I would run it every time at startup. It only takes milliseconds.

Fragile? A reference is a "link" to an installed module on the local computer. People can uninstall programs, they can run an update that breaks it, or move the program to a new computer with different modules installed, so yes it will occasionally happen that a reference is broken. The above code is cheap insurance.

Was this answer helpful?

0 comments No comments

Answer accepted by question author

Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
2012-04-29T01:52:45+00:00

No problem. Here is a function to get you started:

Public Sub CheckReferences()       

    On Error GoTo Err_Handler

    Dim ref As Access.Reference

    Dim strMsg As String

    For Each ref In Access.Application.References

        If ref.IsBroken Then

            strMsg = strMsg & ref.Guid & vbCrLf

        End If

    Next ref

    If Len(strMsg) > 0 Then

        MsgBox "Fatal Error: Unable to start application because of broken references. Quitting." & vbCrLf & "Broken GUIDs: " & vbCrLf & strMsg

        DoCmd.Quit

    End If

End Sub

As I wrote before, the best way to start an application is NOT with a startup form - perhaps conditions are such it is not even appropriate to open the first form. Rather let's first do some checks, setup some global variables, then maybe we will open the first form.

AutoExec macro has one line: RunCode. The argument for RunCode must be the name of a public function in a standard module. I call mine InitApplication.

Public Function InitApplication ()

  CheckReferences

  DoCmd.OpenForm "myFirstForm"

End Function

Was this answer helpful?

0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2012-05-03T19:55:18+00:00

    Hi Tom,

    Thanks for your patience with me on this. I'm still trying to figure out how often I need to run this. It looks like it runs every time I open my program, but once the references and links are all working, do I need to recheck every time? Are these fragile things?

    I've never done code before, but I'm sure you've figured that out by now.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-04-29T00:11:54+00:00

    Confession. I have no idea how one would go about " iterating over the References collection, checking for IsBroken"

    Sorry to be dense, but I'm pretty new at some of this.

    Thanks for any specifics you can tell me.

    Was this answer helpful?

    0 comments No comments