Microsoft Access 2000


         

Public Function funInitReferences()


Dim sFullPath As String, ref As Reference

On Error GoTo 999 '

With appAccess '

For Each ref In .References

If ref.BuiltIn = False Then _

.References.Remove ref '

Next

End With

sFullPath = References("Office").FullPath

appAccess.References.AddFromFile (sFullPath) ' Office

sFullPath = References("DAO").FullPath

appAccess.References.AddFromFile (sFullPath) ' DAO

Exit Function '

999:

MsgBox Err.Description '

Err.Clear '