Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reference resolution

0 views
Skip to first unread message

Steve Schlotter

unread,
Apr 7, 2000, 3:00:00 AM4/7/00
to
Can anyone explain how references resolve themselves? I am seeing some
behavior that I cant explain.
On a machine with Office 97 Pro, I have a database with a reference to
"Microsoft Word 8.0 object library" - msword8.olb. I compile and save and
everything looks fine. I move the .mdb file to a machine with Word 2000
installed and open it with Access 97. When I check the references, it shows
a reference to "Microsoft Word 9.0 object library" - msword9.olb and shows
uncompiled. If I compile and save, and open it from the Machine with Office
97 Pro, it show the "Microsoft Word 9.0 object library" - msword9.olb as
missing.

Any ideas on why this is happening?

Joe Fallon

unread,
Apr 8, 2000, 3:00:00 AM4/8/00
to
It has to do with the dll files that are registered on each PC.
Welcome to dll Hell.
--
Joe
Access MVP
Check out Dev Ashish's web site for answers to common questions
http://www.mvps.org/access/

Steve Schlotter <ste...@coloradocustomware.com> wrote in message
news:38ee3955$1...@news.webaccess.net...

Steve Schlotter

unread,
Apr 10, 2000, 3:00:00 AM4/10/00
to
Is there a way to make the reference to "Word Object Library" and have it
not be sensitive to the version of Word?

"Joe Fallon" <jfal...@nospamtwcny.rr.com> wrote in message
news:eyvkbwRo$GA.256@cppssbbsa05...

SteveT

unread,
Apr 10, 2000, 3:00:00 AM4/10/00
to
Joe's right, it's a bit of a mess. Here's an idea for you. If you develop on Access 2000 and convert and send to Access 97 machines you may be able to use something along the following lines. The first form you open up (startup form) has to be very simple, call no functions but check the references collection. If one of the references is broken and you have anticipated it (in the Select Case statement below), I think you can fix it on the fly using the Application.References.AddFromFile method. You'll have to know where the files are but in a corporate situation should be ok.

I'll admit, when I have messed with references before, if they're broken - I pop a note and shut down the application. They'll call soon enough and we can find out what's up.

Steve

Private Sub Form_Load()
Dim ref As Reference
Dim blnBadRef As Boolean

On Error GoTo errForm_Load

For Each ref In References 'check for broken references
If ref.IsBroken Then
Debug.Print ref.FullPath 'just for checking, to get you going on where they are, etc.
Debug.Print ref.Guid
Debug.Print ref.BuiltIn
Debug.Print ref.Name

Select Case ref.Name 'easier than typing the GUID

Case "C:\Program Files\Microsoft Office\Office\MSWORD9.OLB"
References.Remove ref 'HEY! READ THE CODE, THIS IS A REFERENCE KILLER HERE!
References.AddFromFile "Full Path and name to Word 8 file"

Case "C:\Program Files\Microsoft Office\Office\EXCEL9.OLB"
References.Remove ref 'HEY! READ THE CODE, THIS IS A REFERENCE KILLER HERE!
References.AddFromFile "Full Path and name to Excel 8 file"

Case Else
MsgBox "References Error, call Tech Support"
blnBadRef = True
End Select
End If
Next


Exit_Form_Load:

If blnBadRef Then
DoCmd.Quit
Else
DoCmd.OpenForm "frmSwitchboard"
DoCmd.Close acForm, "frmOpenMeFirst"
End If

Exit Sub

errForm_Load:
Select Case Err.Number
Case 48 'missing DLL
Resume Next
Case Else
Resume Exit_Form_Load
End Select
End Sub


Steve Schlotter <ste...@coloradocustomware.com> wrote in message news:38f20050$1...@news.webaccess.net...

0 new messages