[AccessD] References (again) - Access 97

Charlotte Foust cfoust at infostatsystems.com
Thu Aug 5 13:11:17 CDT 2004


Greg,

It is logical that you cannot declare any objects before you verify the
references.  Even if the Office library isn't the one that's broken, you
need to test the references before you do *anything* else, including
declare object variables as anything but Object.

Charlotte Foust


-----Original Message-----
From: Greg Smith [mailto:GregSmith at starband.net] 
Sent: Thursday, August 05, 2004 6:58 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] References (again) - Access 97


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


-- 
_______________________________________________
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