References lost at runtime?

Kowalski

Registered User.
Local time
Today, 20:11
Joined
Jul 5, 2007
Messages
121
Hi
I'm using Access 2010 and have created an app and released it by using the build in Access Package wizard. The app references 2 seperate .accdb files as libraries that contains VBA code.

However, after I've installed the app on a new PC it seems to be missing some of the references. The 2 files are installed in the same directory as the app, but I get errors when performing certain actions in the runtime version.
Examples of errors: "The expression you entered has a function name that MyApp can't find" and at other places I get the "Enter parameter" pop up screen asking for a value for "MyLibraryFunction"

Note: There are no RefLibPaths entries in the registry.
 
You may need to set the references to the default location before you package the db for runtime, or use some code to set them when the db is opened. Something like
Code:
Dim Ref As Reference

Set Ref = References.AddFromFile("C:\Program Files\Microsoft Outlook\Office11\msoutl.olb")

Modify the path and file name to suite yourself and you'll probably have to add some error handling in case the ref already exists.

HTH
 
Thanks, but it did not work out well for me.
I did add the 2 libraries in a RefLibPaths in the registry and that seemed to work.
I did check and the problem was not quite that the references was lost as it was still in the Relationships collection, but for some or other reason it just did not call some of the functions.
 

Users who are viewing this thread

Back
Top Bottom