Charlotte Foust
cfoust at infostatsystems.com
Mon Mar 24 17:20:13 CST 2003
The MDE doesn't have the problem, it's the database that references it that has a problem. The MDE knows where it as at all times. The database doesn't seem to. Charlotte Foust -----Original Message----- From: MartyConnelly [mailto:martyconnelly at shaw.ca] Sent: Monday, March 24, 2003 2:22 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Access XP and references in libraries You might try this code in your MDE at the immediate start to display and compare proper reference paths . I got tired of trying to decipher the full path name to a DLL in Tools: Reference Window. In Access 97 it cuts off the path filename at about 30 chars. To get the a list of the all the filenames and paths for your external references, run the routine below it places all the references into a string suitable for dropping into a text box. As an afterthought I added some code to give the actual version number from the dll or ocx file etc. This might be useful in an MDE to track if the user has correct version number of DAO ADO etc. installed. Place in About popup window. It only seems to work some of the time if a reference is missing, seems to depend on installation order. So it might not help in missing references. Try printing the returned string on immediate opening in a text box or debug.print MsgBox wont work because it is a member of VBA library and if a reference error occurs you will have a Disambiguation error. Not sure if you will get away with calling as VBA.MsgBox Function ReferencePropertiesList() As String 'list all references in a MDB and place in a string Dim ref As Reference Dim strList As String strList = "Reference Properties:" & vbCrLf & vbCrLf For Each ref In References ' Check for ActiveX type files 'Check for Broken Properties If ref.IsBroken = False Then strList = strList & " Name: " & ref.Name & vbCrLf strList = strList & " FullPath: " & ref.FullPath & vbCrLf strList = strList & " Version: " & ref.Major & "." & ref.Minor & _ vbCrLf 'skip these two calls if detail not needed ' strList = strList & " Description: " & _ GetFileDescription(ref.FullPath) & vbCrLf ' strList = strList & " Version No: " & _ FileVersionNo(ref.FullPath) & _ vbCrLf & vbCrLf Else strList = strList & " GUIDs of broken references:" & vbCrLf strList = strList & " " & ref.Guid & vbCrLf & vbCrLf End If 'MsgBox GetFileDescription(ref.FullPath) 'MsgBox FileVersionNo(ref.FullPath) Next ref Debug.Print strList ReferencePropertiesList = strList End Function _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com