Broken references catch 22

A

AlanV

I have a Microsoft Access database which I want to use as a database,
not an add-in library. It is located in three different paths: one
on my home computer, one on my thumb drive, and one on my work
computer.

I have seen and tried modifying code from several posts, putting
variations of Application.References.Remove / .AddFromFile in a
function called by the Autoexec macro when the database first opens,
as suggested.

ref().IsBroken tells me that the reference is indeed broken, so I
remove it. The immediate window confirms this with a subscript-out-of-
range error if I ask for the value of the .Name or the .FullPath.

When I attempt to .AddFromFile, though, I am told that the name
conflicts with an existing module, object or project library (error
32813).

How do I "really" remove it so it can be re-added?
 
D

Douglas J. Steele

Requesting the Name or FullPath properties of a broken reference will also
give you an error, so your test may not actually prove that the reference
has been removed. What does your current code look like?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top