Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    References (Access 2000, Win XP Home)

    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).

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: References (Access 2000, Win XP Home)

    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.
    Wendell

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: References (Access 2000, Win XP Home)

    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.)

  4. #4
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: References (Access 2000, Win XP Home)

    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.

  5. #5
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: References (Access 2000, Win XP Home)

    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

  6. #6
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: References (Access 2000, Win XP Home)

    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.

  7. #7
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: References (Access 2000, Win XP Home)

    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

  8. #8
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: References (Access 2000, Win XP Home)

    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.

Posting Permissions

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