[AccessD] Broken References in Runtime AXP

Charlotte Foust cfoust at infostatsystems.com
Thu Jul 17 09:59:51 CDT 2003


That's what I meant, Shamil, and I had looked at the RefLibPaths
infromation, but since this is a commercial application, creating custom
profiles may not be an option.  The code I have will repair the
reference but it doesn't appear to execute when the application is
opened using the runtime executable.  That's the brickwall I'm banging
my head against.

Charlotte Foust

-----Original Message-----
From: Shamil Salakhetdinov [mailto:shamil at smsconsulting.spb.ru] 
Sent: Wednesday, July 16, 2003 8:45 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Broken References in Runtime AXP


Charlotte,

If by "repair a broken reference" you mean its resolving on runtime and
when runtime version of MS Access is used then this should be possbible.
I did that with Access97 using custom profiles:

http://smsconsulting.spb.ru/shamil_s/topics/diffstp.htm
http://smsconsulting.spb.ru/shamil_s/topics/refrefs.htm

The same is still valid for MS Access XP - see its online help's excerpt
in P.S. - RefLibPaths is a the main keyword:

HTH,
Shamil

P.S. AccessXP help excerpt:
<<<<
Show All

Set a Reference to a Visual Basic Project in Another Microsoft Access
Database or Project See Also Specifics Each Microsoft Access database
(.mdb or .adp) includes a Visual Basic project. The Visual Basic project
is the set of all modules in the project, including both standard
modules and class modules. Every Microsoft Access database (.mdb or
.adp), library database, or add-in contained in an .mde file includes a
Visual Basic project.

The name of the Access database and the name of the project can differ.
The name of the Access database is determined by the name of the .mdb
(or .mda or .mde) or .adp file, while the name of the project is
determined by the setting of the Project Name option on the General tab
of the ProjectName - Project Properties dialog box, available by
clicking ProjectName Properties on the Tools menu in the Visual Basic
Editor. When you first create a database (.mdb or .adp), the database
name and project name are the same by default. However, if you rename
the database, the project name doesn't automatically change. Likewise,
changing the project name has no effect on the database name.

You can set a reference from a Visual Basic project in one Microsoft
Access database to a project in another Microsoft Access database, a
library database, or an add-in contained in an .mde file. Once you've
set a reference, you can run Visual Basic procedures in the referenced
project. For example, the Northwind sample database includes a module
named Utility Functions that contains a function called IsLoaded. You
can set a reference to the project in the Northwind sample database from
the project in the current database, and then call the IsLoaded function
just as you would if it were defined within the current database.

To set a reference to the project in the Northwind sample database from
another project:

  1.. Open the Module window.
  2.. On the Tools menu, click References, and click Browse in the
References dialog box.
  3.. In the Files Of Type box, click Microsoft Access Databases
(*.mdb).
  4.. Locate the Northwind.mdb file. If you've installed this file, it
will be in the \Program Files\Microsoft Office\Office\Samples folder by
default.
  5.. Click OK.

You should now see "Northwind.mdb" in the list of available references
in the References dialog box.

Notes

  a.. Set a reference to the project in another Microsoft Access
database when you want to call a public procedure that's defined within
a standard module in that database. You can't call procedures that are
defined within a class module or procedures in a standard module that
are preceded with the Private keyword.
  b.. You can set a reference to the project in a Microsoft Access
database only from another Microsoft Access database.
  c.. You can set a reference to a project only in another Microsoft
Access 2002 database. To set a reference to a project in a database
created in a previous version of Microsoft Access, first convert that
database to Microsoft Access 2002.
  d.. If you set a reference to a project or type library from Microsoft
Access and then move the file that contains that project or type library
to a different folder, Microsoft Access will attempt to locate the file
and reestablish the reference. If the RefLibPaths key exists in the
registry, Microsoft Access will first search there. If there's no
matching entry, Microsoft Access will search for the file first in the
current folder, then in all the folders on the drive. You can create the
RefLibPaths key by using the Registry Editor in Windows, under the
registry key
\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\version\Access. For more
information about using the Registry Editor, see your Windows
documentation.
>>>>

----- Original Message -----
From: "Charlotte Foust" <cfoust at infostatsystems.com>
To: <AccessD at databaseadvisors.com>
Sent: Thursday, July 17, 2003 3:11 AM
Subject: [AccessD] Broken References in Runtime AXP


> Does anyone know if it is possible to repair a broken reference in
2002
> under the runtime executable?   I have scoured the MSKB and the web
and
> can't find anything that says you can't ... Except that my experience 
> in trying it is that it simply doesn't happen, no matter how carefully

> I disambiguate the code.  If anyone has ideas, I'm open to suggestion.
>
> Charlotte Foust _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com


More information about the AccessD mailing list