ParentURL 属性 (ADO)

适用于:Access 2013、Office 2013

指示指向当前 Record 对象的父 Record 的绝对 URL 字符串。

返回值

返回一个 String 值,指示父 Record 的 URL。

备注

ParentURL 属性由用于打开 Record 对象的源决定。 例如,可以通过包含 ActiveConnection 属性引用的目录的相对路径名称的源打开 Record

假定"second"是"first"下包含的文件夹。 通过以下代码打开 Record 对象:

    record.ActiveConnection = "https://first"
    record.Open "second"

现在, ParentURL 属性为 ParentURL 属性的值为“https://first",与 ActiveConnection 相同。

源也可以是绝对 URL,例如“https://first/second" 。 ParentURL 属性为 “https://first",高于 的级别。 ParentURL 属性为 “https://first" ,高于”second“的级别。

以下情况下,此属性为空值:

  • 当前对象没有父对象,例如,如果 Record 对象表示根目录。

  • Record 对象表示无法通过 URL 指定的实体。

此属性为只读。

注意