Results 1 to 4 of 4
  1. #1
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    MDE's and References (2003/2002)

    I have made and MDE from one of my MDB databases., and sent it to someone.

    It is a demo for them to evaluate, and I don't want them to be able to look at the code etc.

    When they try to open it they get : "The Visual Basic for Applications Project in the database is corrupt"

    Needless to say it runs perfectly for me. Is this a sign of broken references?

    If this is so, then is there any way to fix it?

    You don't seem to be able to bring up the references dialog box in an mde.
    Regards
    John



  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: MDE's and References (2003/2002)

    You can check the references thru code. I put a button on my startup form that includes this code:

    Dim strMessage As String
    Dim strTitle As String
    Dim refItem As Reference

    for each refItem in References
    strTitle = "Displaying References and Their Locations"
    strMessage = "Reference: " & refItem.Name & Chr(10) & Chr(13) _
    & "Location: " & refItem.FullPath & Chr(10) & Chr(13) _
    & "GUID: " & refItem.Guid & ", " & refItem.Major & ", " & refItem.Minor
    End If

    MsgBox strMessage,vbInformation,strTitle
    Next
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: MDE's and References (2003/2002)

    Some hours later I am told they have somehow got it working. Don't know how. The person I spoke to didn't know.

    Mark, I have tried your code and can see what it does.

    I have just added this to tell me if anything is missing.

    If Dir(refItem.FullPath) = "" Then
    strMessage = strMessage & vbNewLine & "Missing"
    Else
    strMessage = strMessage & vbNewLine & "Found"
    End If

    At the moment, I can't test this with any missing references, but it shows "found" for all those I do have.

    Your code has a superfluous "end if" in it, suggesting something has been cut out for your posting here.
    Regards
    John



  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: MDE's and References (2003/2002)

    >>Your code has a superfluous "end if" in it, suggesting something has been cut out for your posting here. <<


    Yeah, I lifted it quickly from some of my existing code, just trying to show how you can cycle thru the references collection.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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