• References (Access 2000, Win XP Home)

    Author
    Topic
    #381716

    I have created a new database on a laptop running Win XP Home and Office 2000. I am logged in with administrator priviliges. In a module I wanted to change the references to code libraries and received an error message which translates roughly as ‘Error in accessing registry’, no further info or number. I have looked at other DB’s created on my main PC and some exhibit the same behaviour, others allow me to modify the references!

    Ideas as to what is going on? and how can I get around this. (It is consistant behaviour within a DB, not that it sometimes is OK and sometimes not).

    Viewing 0 reply threads
    Author
    Replies
    • #644904

      Does this happen if you remove a reference? I’ve seen cases where you had to remove a reference first, close the module and then go back and add the correct reference. Just a shot in the XP dark – hope it helps.

      • #645017

        I’ll copy this DB to my main PC and give it a try. (The DB functions without any errors – I want to add code that requires another library that isn’t one of the standard ones.)

      • #645023

        OK. I’ve copied it across to main PC. Opened module, removed a reference. It still compiles without error. Copied back to laptop. Opened module, still same error message ‘Error in accessing registry’ (try help button on msgbox – empty VB Help window appears). On main PC put reference back into place. Copied back and tested – still same behaviour.
        Have you any other ideas to try out? Do you have a piece of code for listing the current references and their states? That would at least give an idea of a reference to a library being bad.

        • #645041

          Here is example of sub that will iterate thru the references in current project & indicate if any are broken:

          Function ReferenceInfo()
          On Error Resume Next

          Dim strMsg As String
          Dim Ref As Reference

          For Each Ref In References
          strMsg = “Reference: ” & Ref.Name & vbCrLf _
          & “Location: ” & Ref.FullPath & vbCrLf _
          & “GUID: ” & Ref.Guid
          If Ref.IsBroken Then
          strMsg = “BROKEN REFERENCE:” & vbCrLf & strMsg
          End If
          Debug.Print strMsg
          Debug.Print
          Next Ref

          Set Ref = Nothing

          End Function

          This may or may not be of assistance.

          PS: Re GUID: “Every type library has an associated GUID which is stored in the Registry. When you set a reference to a type library, Microsoft Access uses the type library’s GUID to identify the type library. You can use the AddFromGUID method to create a Reference object from a type library’s GUID.” (from Help file)

          HTH

          • #645045

            Hi Mark, thanks for the code and the AddFromGUID tip.

            I’ve put this code into a module and run it. All references are fine but still no joy in getting at them from the menu. That still fails.

            • #645052

              The MSKB has several useful articles concerning Missing References, but none address the specific error you are encountering in accessing the References dialog. This article (MSKB Art 269383), although it references Windows 2K, does address the “Error Accessing Registry” error, maybe will provide a clue to resolving problem:

              PRB: ‘Error Accessing the System Registry’ Message When Displaying VB/VBA References

              HTH

            • #645072

              Interesting. I’ve had a quick look and it specifically refers to the problem being caused by a full installation of Crystal Reports 8. I have had vers. 8 installed on the laptop and since replaced it with vers. 9. I’ll try what they recommend as the solution when I get a chance in the near future.
              Thanks.

    Viewing 0 reply threads
    Reply To: References (Access 2000, Win XP Home)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: