Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Location
    Melbourne, Australia
    Posts
    53
    Thanks
    2
    Thanked 1 Time in 1 Post

    Compile Error - broken references? (Access97)

    For some reason unknown, my Access97 has started to fail to run or compile programs that were operating without problem until just a couple of days ago. The error I receive is:

    Compile Error
    Function or interface marked as restricted or the function uses an
    Automation type not supported in Visual Basic.

    When I try to compile the code the error lines refer to objects like 'currentdb' or 'dbengine'.
    I suspect this may be a case of broken references, but the list looks OK (...as a secondary question, how do I know what references should be set anyway?). The problem appears to be affecting all mdbs, and not just one which may have been corrupted. After trying a number of things, I have even tried a reinstall of A97, but still without success.

    I would be grateful for any help in interpretting this error, and even more so for suggestions about how to fix it.

    Thanks,
    Geoff

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Compile Error - broken references? (Access97)

    Are you using any ActiveX controls or Office automation? The only thing I found in the knowledgebase is this <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/q205/6/73.asp>BUG: Access 97 Generates Invalid Code for OLE_COLOR [Q205673]</A> If you are using ActiveX controls, have you installed anything new on your machine that might have either stepped on the libraries or "updated" them so they no longer work?
    Charlotte

  3. #3
    Star Lounger
    Join Date
    Nov 2001
    Location
    Illinois, USA
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Compile Error - broken references? (Access97)

    Have any of your Microsoft Office files been moved to different locations recently? We had a similar problem when we were upgraded to Office 2000 and Access97 was moved to a different directory to allow time for conversion efforts. The Access97 projects looked for references in Microsoft OfficeOffice and automatically changed them to the newer versions, so that the reference to Microsoft Access pointed to MSACC9.OLB instead of the required MSACC8.OLB (97 version). MSACC8.OLB is the Object Library that has interfaces that recognize the names 'currentdb' and 'dbengine' . We also were using Word Automation and since Word 97 had been removed, the reference was automatically changed to MSWORD9.OLB. I have also had the experience that sometimes just unchecking the reference even if it looks to be pointing to the right OLB or DLL location, closing the project, reopening it, and resetting the reference by checking it again fixes these broken references. You might have to reset all the references; when this happened to me I was also getting compile errors on VBA functions even though the VBA library appeared checked in the list. Even if none of your files have been moved, it might be worth a shot to redo references. Good luck!

  4. #4
    npsarros
    Guest

    Re: Compile Error - broken references? (Access97)

    I have had similar problems but never with all my databases. For some reason compacting would not help, but creating a new database and copying all the components into the new blank database did the trick....

    try i t.. wata you have to loose! <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15> <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>

  5. #5
    Star Lounger
    Join Date
    Apr 2001
    Location
    Melbourne, Australia
    Posts
    53
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Compile Error - broken references? (Access97)

    Thanks to all those who responded. Yes, I did find that reference, Charlotte, but it was not of much relevance in this case.

    It is ironic that the solution was exactly what I had commended to another poster in a previous reply (#63460). The problem turned out to be that once again DAO350.DLL had lost its registration and I had to re-register it. Now I just need to find out what is causing that to happen! I suspect some interference mechanism between A2K and A97, but have no thoughts yet on how to test or prove that, as it is very intermittent (I have seen it twice now, but with symptoms which were different enough to throw me off the scent).

    Geoff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •