[AccessD] References (again) - Access 97

Greg Smith GregSmith at starband.net
Thu Aug 5 09:57:52 CDT 2004


Hi everyone...

Thanks to everyone who responded to my earlier post(s) about references
and how to find broken ones (I don't have my list here at work so I don't
have all the responses).

I still have the references issue.  And it may be because of how I'm
starting the program or how I have the references set.  There is only one
right now that is giving me the PITA, and it's to mso97.dll in the Office
directory.  Hard to test that one too, because if you delete it, Access
won't start.

I can use the References.AddFromFile(...) code to set the reference.  But
there's a catch-22...if I don't have a reference to the MS Office 8.0
Object library, then the code:

Dim cbr as CommandBar

fails just before I can set the reference using:

SetRef = References.AddFromFile("c:\program
files\msoffice97\office\mso97.dll")

Actually, in REAL life, I don't like using hard coded paths because in the
other computers, who's to say they use this same path.  And I just KNOW
I'm going to run into this again because within the month I'm converting
their entire system to Access XP.

So, being more realistic...should I just trap the stinking error if the
reference already exists and go on or is there a better philosophy about
doing this altogether?  I would really HATE to have to go onsite and SET
each computer's individual references to the correct ones.  THAT would
redefine PITA.  Probably close to 50 compters.  Blech.

Greg Smith
gregsmith at starband.net





More information about the AccessD mailing list