CurrentData 對(duì)象

此頁沒有內(nèi)容條目
內(nèi)容

expandtri全部顯示

Application

parchildCurrentData

spaceparchild多個(gè)對(duì)象

CurrentData 對(duì)象引用由源(服務(wù)器)應(yīng)用程序(Jet 或 SQL)存儲(chǔ)在當(dāng)前數(shù)據(jù)庫中的對(duì)象。

使用 CurrentData 對(duì)象

CurrentData 對(duì)象有好幾個(gè)包含當(dāng)前數(shù)據(jù)庫中特定 AccessObject 對(duì)象的集合。下表列出了數(shù)據(jù)庫定義的每個(gè)集合的名稱及其所含對(duì)象的類型。

集合

對(duì)象類型

AllTables

所有表

AllFunctions

所有函數(shù)

AllQueries

所有查詢(Microsoft Access 項(xiàng)目 (.adp) 中的查詢個(gè)數(shù)將為零)。

AllViews

所有視圖(Access 數(shù)據(jù)庫 (.mdb) 中的視圖個(gè)數(shù)將為零)。

AllStoredProcedures

所有存儲(chǔ)過程(.mdb 數(shù)據(jù)庫中的存儲(chǔ)過程個(gè)數(shù)將為零)。

AllDatabaseDiagrams

所有數(shù)據(jù)庫圖表(.mdb 數(shù)據(jù)庫中的數(shù)據(jù)庫圖表個(gè)數(shù)將為零)。

 

注釋  上表中的集合包含了數(shù)據(jù)庫中各方面的對(duì)象,不管它們是打開還是關(guān)閉。

例如,代表表的 AccessObject 對(duì)象是 AllTables 集合的一個(gè)成員,AllTables 集合是當(dāng)前數(shù)據(jù)庫中 AccessObject 對(duì)象的集合。在 AllTables 集合中,單個(gè)表從零開始索引。通過按名稱或按其在集合中的索引引用表,可以引用 AllTables 集合中的單個(gè) AccessObject 對(duì)象。如果要引用 AllTables 集合中的特定項(xiàng),最好按名稱引用它,因?yàn)轫?xiàng)的索引可能會(huì)改變。如果對(duì)象名中包含空格,那么必須將名稱用方括號(hào) ([ ]) 括起來。

語法

示例

AllTables!tablename

AllTables!OrderTable

AllTables![table name]

AllTables![Order Table]

AllTables("tablename")

AllTables("OrderTable")

AllTables(index)

AllTables(5)