I have written an Access 97 application as an extension to a legacy Access 97 .mde for which we have no source code, running under Windows 7. Ideally, I want to be able to relink the tables when the "extension" .mde is placed alongside the "legacy" on the Windows 7 target machine. I have created a form button "Re-link the tables" which works fine on my development environment (XP in VMWare on a Mac) where I have a full Access 97 licence, but does not work when run using the system.dsw Access runtime on the target machine.
The current workaround is to "prelink" the tables so that the "extension" .mde already contains the correct references, but I want to allow the user to relink to other folders containing alternate sets of data.
The form button runs the VBA code statement:
CommandBars("Tools").Controls("&Add-Ins").Controls("&Linked Table Manager").Execute
But under Windows 7 the .mde does not carry the toolbar which runs the Linked Table Manager, so it just gives an illegal function error message, although it runs perfectly in the development environment.
Any suggestions on how to get around this?