zocker
07-13-2001, 05:05 PM
Greetings all and thanks for a really very pleasant forum. Here's my problem. I have a complex Access2000 application which uses WINFAX, OUTLOOK, and OUTLOOK EXPRESS as well as EXCEL...and a few others. I am having big problems when transfering copies of this to new machines....whether the complete app or just the front ends of split db's. These problems are caused by References.....or lack of them to the 'dll's OCX's & others. I have code (from Access helpfiles) which should allow these references to be set 'automatically' say by an autexec macro. (Code below)
Now what happens is if I 'manually' set a reference to Microsoft DAO 3.6 library I have no problems....this refers to File: C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\DAO\DAO360.DLL
BUT if I set the reference using this code:
Function ReferenceFromFile(strFileName As String) As Boolean
Dim ref As Reference
On Error GoTo Error_ReferenceFromFile
Setref=References.AddFromFile("C:\PROGRAMFILES\COMMONFILES\MICROSOFTSHARED\DAO\DAO360.DLL")
ReferenceFromFile = True
Exit_ReferenceFromFile:
Exit Function
Error_ReferenceFromFile:
MsgBox Err & ": " & Err.Description
ReferenceFromFile = False
Resume Exit_ReferenceFromFile
End Function
Then, when I look in the References window, I have a reference to Microsoft ActiveX Data Objects library and the related file C:ProgramFiles Common files Sytem ADO msado21.tlb and the database code does not work at all. If anyone knows about References and can either help me or point me at good source for the subject, I'd be reall pleased.
Regards & Thanks
Now what happens is if I 'manually' set a reference to Microsoft DAO 3.6 library I have no problems....this refers to File: C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\DAO\DAO360.DLL
BUT if I set the reference using this code:
Function ReferenceFromFile(strFileName As String) As Boolean
Dim ref As Reference
On Error GoTo Error_ReferenceFromFile
Setref=References.AddFromFile("C:\PROGRAMFILES\COMMONFILES\MICROSOFTSHARED\DAO\DAO360.DLL")
ReferenceFromFile = True
Exit_ReferenceFromFile:
Exit Function
Error_ReferenceFromFile:
MsgBox Err & ": " & Err.Description
ReferenceFromFile = False
Resume Exit_ReferenceFromFile
End Function
Then, when I look in the References window, I have a reference to Microsoft ActiveX Data Objects library and the related file C:ProgramFiles Common files Sytem ADO msado21.tlb and the database code does not work at all. If anyone knows about References and can either help me or point me at good source for the subject, I'd be reall pleased.
Regards & Thanks