References in Access 2000

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

fredriko
07-16-2001, 03:40 AM
Don't know if it means anything but I have developed a couple of Access2000 Applications that use a shed load of references and I found that the easiest way to ensure the target workstation has all the references in place was to create a package and install it on the PC using the Package and Deployment wizard that comes with Microsoft Developer. This should put all you need in place to be able to run the App.

Bringing it large to the Northern Lads and Lasses. Big Up!

zocker
07-16-2001, 05:35 PM
Thanks, I woud do that but I am a bit short of the Pounds Steling 800 which is needed to buy the Packager....

regards

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum