AllTables 属性 (权限)AllTables.Item property (Access)

Item 属性返回集合中的位置或索引中的特定成员。The Item property returns a specific member of a collection either by position or by index. 只读的 AccessObjectRead-only AccessObject.


表达式(var)expression.Item (var)

_表达式_一个代表**AllTables** 对象的变量。expression A variable that represents an AllTables object.


名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
varvar 必需Required VariantVariant 一个表达式, 指定_表达式_参数所引用的集合的成员的位置。An expression that specifies the position of a member of the collection referred to by the expression argument.

如果是数值表达式,则 _index_参数必须为介于 0 值与该集合的 Count 属性减 1。If a numeric expression, the index argument must be a number from 0 to the value of the collection's Count property minus 1.

如果是字符串表达式,则 _index_参数必须是集合成员的名称。If a string expression, the index argument must be the name of a member of the collection.


如果为 index 的参数提供的值与任何已有集合成员都不匹配,将会产生错误。If the value provided for the index argument doesn't match any existing member of the collection, an error occurs.

Item 属性是集合的默认成员,所以不需要显式指定。The Item property is the default member of a collection, so you don't have to specify it explicitly. 例如,下面的两行代码是等效的。For example, the following two lines of code are equivalent.

Debug.Print Modules(0)
Debug.Print Modules.Item(0)

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.