Question Access 2007 deployed via Runtime

doctork11

New member
Local time
Today, 07:34
Joined
Dec 24, 2010
Messages
3
Hello everyone,
I am a first time poster here, so bare with me. In my Access 2007 database, I am able to run code on a button to start the Linked Table Manager. Once I package the database with Access 2007 Runtime, Access freezes up and closes the project. Here is the code...
Code:
Option Compare Database
Private Sub Toggle14_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoCmd.RunCommand acCmdLinkedTableManager
End Sub

The purpose of this is to link the data in the Access DB to a SQL Server Enterprise Edition. I have developed several Stored Procedures to manage and manipulate the data for reporting. Is there a way to "launch" Linked Table Manager in a version of Access 2007 that has packaged with Runtime?
 
>>>Access freezes up and closes the project.<<<


When you develop applications with Microsoft access “old code” builds up within your project and can cause problems particularly when you are doing something like this.
There are several things you can try, you could try compacting your database, the other thing to try as well is to create a brand new empty database and import everything from your old database into the new database. I should give this ago and see if you have a different result.
 
Neither option worked. Any other suggestions?
 

Attachments

  • ScreenHunter_02 Dec. 24 08.08.jpg
    ScreenHunter_02 Dec. 24 08.08.jpg
    20.8 KB · Views: 179
Last edited:
You appear confident that the code:

Option Compare Database
Private Sub Toggle14_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoCmd.RunCommand acCmdLinkedTableManager
End Sub

is somehow responsible for the issues you are having. I would suggest that you comment out this code, then RE-package your application and see if you still have the same problem.
 
I appreciate the response. My problem isn't the code since it works just fine in the unpackaged application. Once I use the Developer > Package Solution (see attached), the application fails when I push the backup button I created.

Let me ask the question a different way. The main goal of the toggle button I created is so the customer can link the Access DB to the SQL DB. Then all my magic (data manipulation and reporting) is conducted in SQL at the end of the day. Is there a way to package the solution and still run the Linked Table Manager? Is there something in the Access Options to include that feature in the package? I'm assuming that feature is not available in a packaged solution, which is causing the problem.
 

Attachments

  • ScreenHunter_03 Dec. 24 08.46.jpg
    ScreenHunter_03 Dec. 24 08.46.jpg
    42.7 KB · Views: 158
>>>I'm assuming that feature is not available in a packaged solution<<<


Your assumption may or may not be correct, if you humour me and try what I suggest then we will have a better idea!

The other thing you can do is read the MS Access help regarding the packaging of MS Access and see if it definitely tells you that it’s not available.

I have used the linked table manager in an MBE format database, a database with limited functionality, but I have not yet used it in a packaged version. My instinct is if it works in an MDE then it should work in a packaged set up but I don’t know.
 
Last edited:
Check out this free relinker code which is provided by J Street Technology (Access MVP Armen Stein). You can include it in your project and then it can check to see if the data source is available, including checking to see if the source is in the same directory as the frontend and if not it brings up a dialog to select the location of the backend.

Also, one thing you might not be aware of which can be causing a problem is that any code you run for links has to be run from an AutoExec macro because that is the ONLY place where you can do anything BEFORE Access does its check for table links, references, etc. So any other place and it will bomb because it can't find the backend and will generate an error. I'm guessing that is why you have been having a problem.
 

Users who are viewing this thread

Back
Top Bottom