Missed reference

P

Pietro

Hi,

I 've deployed an mde database and it's working fine, my only problem is
when i try to use it on certain computers, i encounter the problem of the
"missed reference",so i've to open the mdb file and fix the refernce and
create a new mde file... is there a way to fix the problem once and forever
through mde file or through MS Office 2007 itself?
 
D

Douglas J. Steele

Make sure you're using the minimium set of references possible. Avoid using
Early Binding wherever possible so that you don't need to add references.

On the machine where the mdb was developed, determine where each of the
referenced files exists, and what version each one is. (I've got sample code
to help do this at
http://www.accessmvp.com/DJSteele/AccessReferenceErrors.html )

On each client machine where the mde will be run, make sure that the same
version of each file exists in the same location.
 
T

Tony Toews [MVP]

Pietro said:
I 've deployed an mde database and it's working fine, my only problem is
when i try to use it on certain computers, i encounter the problem of the
"missed reference",so i've to open the mdb file and fix the refernce and
create a new mde file... is there a way to fix the problem once and forever
through mde file or through MS Office 2007 itself?

To add to Douglas's reply run the following code and report back so we
can give you specific advice on your references.

Sub ViewReferenceDetails()

Dim ref As Reference

For Each ref In Access.References
Debug.Print ref.Name & " - " & ref.Major & "." & ref.Minor & "
- " & ref.FullPath
Next ref

End Sub

Tony
 
P

Pietro

Hi Tony,

Dealng with the problem with a code is the best solution for me, thank u
for ur suggestion.
I tried to run the below code but i got a runtime error 13 , type mismatch
 
T

Tony Toews [MVP]

Pietro said:
Dealng with the problem with a code is the best solution for me, thank u
for ur suggestion.
I tried to run the below code but i got a runtime error 13 , type mismatch

Try the following code. I've improved the error handling if there's
an invalid reference.

Public Sub ViewAccessVBEReferenceDetails()

Dim refIDE As Object

For Each refIDE In
Access.Application.VBE.ActiveVBProject.References
If (refIDE.IsBroken) Then
Debug.Print "**** Unknown broken reference *****"
Else
Debug.Print refIDE.Description & " " & vbCrLf & _
" " & refIDE.Name & " " & refIDE.Major & "." & _
refIDE.Minor & " " & refIDE.FullPath
End If
Next refIDE

End Sub

If one of the references is indeed broken you'll have to go to the
references screen yourself and figure out which one is missing. Even
though you can see it on the screen I couldn't figure out any means of
getting the description.

(Other than possibly going through the GUIDs in the registry and
seeing what matches. Hmm, no that wouldn't work either as the name of
the mssing reference is somehow stored in Access and not in the
registry.)

Tony
 

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