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

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


expressionexpression. 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 与值减 1 之间的集合的 Count 属性。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)

另请参阅See also

AllTables 集合AllTables Collection