Access References Using UNC

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jay

    #1

    Access References Using UNC

    Using a custom mda file that holds the code for the login sequence for
    multiple Access 2000 databases. The problem occurs when the reference
    path is changed to a UNC path. This happens when maintenance is
    performed on the databases, the path changes from a drive letter to
    the UNC path. Users to not have access to this path. Is there a way
    to set the location through code for the path to the mda. I would
    like to use this in case our developers forget to change the path back
    to the drive letter. I want to trap the error and reset it to the
    drive letter.

    Basically, is there a way to get to the location of references without
    going through the wizard in Visual Basic?

    Thanks in advance.

    Jay
  • Jack MacDonald

    #2
    Re: Access References Using UNC

    There is a References object that may help

    Sub test()
    Dim ref As Reference
    For Each ref In Application.Ref erences
    MsgBox ref.Name
    Next ref
    End Sub

    www.trigeminal.com has an article about "disambiguating " references to
    be certain the system doesn't hang if one of the references is broken



    On 7 Jul 2004 15:25:30 -0700, spring.jason@co lteng.com (Jay) wrote:
    [color=blue]
    >Using a custom mda file that holds the code for the login sequence for
    >multiple Access 2000 databases. The problem occurs when the reference
    >path is changed to a UNC path. This happens when maintenance is
    >performed on the databases, the path changes from a drive letter to
    >the UNC path. Users to not have access to this path. Is there a way
    >to set the location through code for the path to the mda. I would
    >like to use this in case our developers forget to change the path back
    >to the drive letter. I want to trap the error and reset it to the
    >drive letter.
    >
    >Basically, is there a way to get to the location of references without
    >going through the wizard in Visual Basic?
    >
    >Thanks in advance.
    >
    >Jay[/color]


    *************** *******
    jackmacMACdonal d@telusTELUS.ne t
    remove uppercase letters for true email
    http://www.geocities.com/jacksonmacd/ for info on MS Access security

    Comment

    • Jay

      #3
      Re: Access References Using UNC

      This was helpful in viewing the references at runtime however the
      values are in a read only state and I cannot change the fullpath
      value.

      Comment

      • Jack MacDonald

        #4
        Re: Access References Using UNC

        You must remove the broken reference from the References collection,
        then add a new one with the correct path.

        References.Remo ve ref
        References.AddF romFile fullpathname



        On 8 Jul 2004 08:43:29 -0700, spring.jason@co lteng.com (Jay) wrote:
        [color=blue]
        >This was helpful in viewing the references at runtime however the
        >values are in a read only state and I cannot change the fullpath
        >value.[/color]


        *************** *******
        jackmacMACdonal d@telusTELUS.ne t
        remove uppercase letters for true email
        http://www.geocities.com/jacksonmacd/ for info on MS Access security

        Comment

        Working...