Table of contents
TOC
折叠目录
展开目录

CurrentData 对象 (访问)CurrentData Object (Access)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

CurrentData对象是指源 (服务器) 应用程序存储在当前数据库中的对象。The CurrentData object refers to the objects stored in the current database by the source (server) application.

注解Remarks

CurrentData对象具有多个包含在当前数据库内的特定AccessObject对象的集合。下表列出了由数据库和它所包含的对象类型定义的每个集合的名称。The CurrentData object has several collections that contain specific AccessObject objects within the current database. The following table lists the name of each collection defined by the database and the types of objects it contains.

集合Collections对象类型Object type* * 在 Access 数据库中使用 * *Available in Access database **在 Access 项目 (.adp) 中可用Available in Access Project (.adp)
AllTablesAllTables所有表All tablesYesYes
AllFunctionsAllFunctions所有函数All functionsNoYes
AllQueriesAllQueries所有查询All queriesYesYes
AllViewsAllViews所有视图All viewsNoYes
AllStoredProceduresAllStoredProcedures所有存储过程All stored proceduresNoYes
AllDatabaseDiagramsAllDatabaseDiagrams所有数据库图表All database diagramsNoYes

请注意 前面的表中的集合包含所有无论数据库中的各个对象,它们是打开还是关闭。Note The collections in the preceding table contain all of the respective objects in the database regardless if they are opened or closed.

例如,代表表AccessObjectAllTables集合是在当前数据库中的AccessObject对象的集合的成员。在AllTables集合中从零开始索引的各个表。您可以通过按名称,或引用集合中的索引表引用AllTables集合中的单个AccessObject对象引用。如果要引用AllTables集合中的特定项,最好到该名称引用,因为该项的索引可能会更改。如果对象名中包含空格,名称必须用方括号 ([])。For example, an AccessObject representing a table is a member of the AllTables collection, which is a collection of AccessObject objects within the current database. Within the AllTables collection, individual tables are indexed beginning with zero. You can refer to an individual AccessObject object in the AllTables collection either by referring to the table by name, or by referring to its index within the collection. If you want to refer to a specific item in the AllTables collection, it's better to refer to it by name because the item's index may change. If the object name includes a space, the name must be surrounded by brackets ([ ]).

语法Syntax示例Example
AllTables表名AllTables ! tablenameAllTables !OrderTableAllTables!OrderTable
AllTables ![表名称]AllTables ![ table name]AllTables![Order Table]AllTables![Order Table]
AllTables("表名")AllTables (" tablename")AllTables("OrderTable")AllTables("OrderTable")
AllTables索引AllTables ( index)AllTables(0)AllTables(0)

属性Properties

名称Name
AllDatabaseDiagramsAllDatabaseDiagrams
AllFunctionsAllFunctions
AllQueriesAllQueries
AllStoredProceduresAllStoredProcedures
AllTablesAllTables
AllViewsAllViews

另请参阅See also

其他资源Other resources

Access 对象模型引用Access Object Model Reference

© 2018 Microsoft