Access ELF Documentation Access ELF Tutorials Access ELF On-Line Help Access ELF Downloadable Help File Access ELF FAQ VB ELF Documentation VB ELF Tutorials VB ELF On-Line Help VB ELF Downloadable Help File VB ELF FAQ
Configuration & Licensing Options
Critical Opinions
Our Users Talk Back






Remove References on Exit (Settings/Preferences tab)


In Access ELF 2002, the Remove References on Exit checkbox has no effect. This page is intended to explain the effect it had in prior versions, and why it has been retained for possible future use.

Previous versions (from Access ELF 97 on) required a work-around to handle a problem in Access 97 and Access 2000. This problem sometimes prevented toolbars contained within a library from displaying in the application which used that library. The bug manifested itself only when
1) code was run within the application prior to an attempt to load the toolbar
2) a reference to the library was already present in the application at start-up

The only situation requiring a permanent reference to the ELF library existed in cases where developers wrote code to directly invoke ELF functions (rather than using normal means such as the ELF toolbar). Since this was rare, Access ELF was designed to add a reference to itself on start-up, and remove that reference on exit. For those cases where developers preferred a persistant reference (so that ELF functions could be invoked) the "Remove References on Exit" checkbox could be cleared.

According to our tests, as of Access XP there is no longer a problem displaying toolbars from external libraries. This eliminates the sole reason for removing the elf32 (ELF library) reference each time the application is closed (thus requiring that it be re-established each time Access ELF is selected from the Add-in menu). This is fortunate, since a new problem in Access XP prevents references from being removed programmatically from within library code.

The upshot is that Access ELF now inserts a reference to itself (elf32.mda) into the user's application the first time it is loaded. That reference will remain until it is manually deleted by a user. This can be done by opening any module (or creating a new one), clicking on the Tools menu item and choosing References. Unchecking elf32 in the references list will cause the reference to be dropped. Once you have unchecked the reference you must close and save the open module. If the module is a blank module (created simply to get access to the Tools/References menu item) then you must first save, then delete the module. This difference between Access XP and prior versions of Access is the reason that the Remove References is ineffective, since it's not possible to save modules from within a running library!

Deleting the reference will have no effect, unless you have added code into your application which directly refers to ELF functions. In that case, removing the reference would cause this code to fail to compile. Note however that the code would still work properly, as long as Access ELF were started prior to that code being triggered.

Access ELF 2002 can be used with either Access 2002 or Access 2000. (This is because Microsoft did not substantially change the file formats between these two versions.) That means that Access ELF 2002 may in fact be running in a version of Access which exhibit these problems. For this reason the Remove References on Exit checkbox has been retained, even though it does not apply to use with Microsoft Access 2002 (Access XP).

For completeness, here is the explanation that appeared in previous versions.

Special considerations

Prior to MS Access version 8.0 there was no method of programatically installing references to code libraries such as ELF32.MDA. (Technically, ELF32 is both an add-in library and a code library.) MS Access 8.0 permits these references to be added by the program itself. However, due to a design flaw or bug, Access 8.0 appeared to have a problem loading the toolbars from a library MDA file (such as our vertical toolbar), in cases where code is executed prior to invoking the add-in. For instance, if you have an Access application which loads a startup screen with a code-behind-form module, this might inhibit the toolbar when you selected Access ELF.

This problem seemed to affect only pre-existing references to add-in libraries. So, in order to work around this problem, our add-in was designed to create a reference to itself when invoked, and later delete the reference when the database is closed. If you open the References list after selecting Access ELF from the Add-ins list. you should see the ELF32.MDA reference listed. Once you close and reopen the database, it should no longer be listed (until the next time you use Access ELF).

However, if Access is terminated abnormally (for instance, if you simply switch-off your machine), then the reference to Access ELF will not have been removed. In that case, if you execute code prior to invoking Access ELF, the toolbar will not appear. In this case, simply close the database. This will cause the Access ELF reference to be deleted. When you reopen the database, the problem should not reoccur.

Access ELF now has a Preference setting which allows you to determine whether the reference will be deleted on Exit. One reason you might not want the reference to be deleted is so that you can start Access ELF programatically from within your application -- for instance, by letting a user push a button. Setting "Remove References" to OFF allows you to start Access ELF this way. For example: result = aetbQuery() initializes the add-in and invokes the Query window. (You can also run other ELF functions from code; to see examples, set Tools/Options/Show System Objects and look at the Usys ELF Macros.)

Unfortunately, the ELF toolbar may not load from the add-in with this option ("Remove References") set OFF. To use the toolbar, you'll need to import it from elf32.mda. To do this, use File/Get External Data/Import. Select elf32.mda from the parent directory of your Microsoft Access installation (usually c:\Program Files\Microsoft Office). Then click the Options button, check Menus and Toolbars, and click OK.


Last Updated: March, 2002