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. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2012-04-28T22:52:27+00:00

    It tells you that a trivial app works. It also means a whole host of possible problems with installation is likely not the issue here. The problem is with your app.

    Did you check if you have a References problem? You can do this in VBA by iterating over the References collection, checking for IsBroken. This is a good thing to do in all your applications. Write the code once, and make it part of your startup code (Autoexec macro > RunCode > call a public function in a standard module).

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-04-28T22:30:37+00:00

    Hi Tom,

    I just opened the test database, and saw my "Hello" message.

    I'm sure this tells us more about what the problem with my real database, but what does it tell me, please.

    Was this answer helpful?

    0 comments No comments
  3. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2012-04-28T17:27:57+00:00

    It could be a References issue, or a Trusted Locations issue. I would start with deploying a do-nothing application: create a new application with only an AutoExec macro with one statement: MsgBox "Hello". Does that work?

    Was this answer helpful?

    0 comments No comments