Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lost reference 1

Status
Not open for further replies.

Blorf

Programmer
Dec 30, 2003
1,608
US
Hi.

I have a reference set in my module to an outsde MDE.

On one pc, you open the app, and the reference is not broken, it's just gone.

I put it back, and a week later it goes away again.

Any idea why? Also, can a reference be set via code, so on start up it checks and if it's gone, it resets?

Thanks,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.

 
Something like this?

Code:
   Function RefExists(RefName)
   Dim ref As Object
    
   RefExists = False
    
   For Each ref In References
       If ref.Name = RefName Then
           RefExists = True
       End If
   Next
    
   End Function
    
   Function ReferenceFromFile(strFileName As String) As Boolean
   Dim ref As Reference
    
       On Error GoTo Error_ReferenceFromFile
       References.AddFromFile (strFileName)
       ReferenceFromFile = True
    
   Exit_ReferenceFromFile:
       Exit Function

   Error_ReferenceFromFile:
       ReferenceFromFile = False
       Resume Exit_ReferenceFromFile
   End Function
 
Perfect thank you!

Any idea why it drops the reference though?

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top