CurrentData object (Access)
The CurrentData object refers to the objects stored in the current database by the source (server) application.
Remarks
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 | Available in Access database | Available in Access Project (.adp) |
---|---|---|---|
AllTables | All tables | Yes | Yes |
AllFunctions | All functions | No | Yes |
AllQueries | All queries | Yes | Yes |
AllViews | All views | No | Yes |
AllStoredProcedures | All stored procedures | No | Yes |
AllDatabaseDiagrams | All database diagrams | No | Yes |
Note
The collections in the preceding table contain all of the respective objects in the database regardless if they are opened or closed.
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. 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!tablename | AllTables!OrderTable |
AllTables![table name] | AllTables![Order Table] |
AllTables("tablename") | AllTables("OrderTable") |
AllTables(index) | AllTables(0) |
Properties
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기