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

SubForm.TabStop 属性 (访问)SubForm.TabStop Property (Access)

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

TabStop属性用于指定是否可以使用 TAB 键将焦点移到控件。读/写boolean 类型的值You can use the TabStop property to specify whether you can use the TAB key to move the focus to a control. Read/write Boolean.

语法Syntax

表达式制表位expression. TabStop

表达式_一个表示子窗体对象的变量。_expression A variable that represents a SubForm object.

注解Remarks

当切换按钮控件出现在选项组中时,此属性不适用于这些控件,它仅适用于选项组本身。This property doesn't apply to toggle button controls when they appear in an option group. It applies only to the option group itself.

TabStop属性使用以下设置。The TabStop property uses the following settings.

设置SettingVisual BasicVisual Basic说明Description
YesTrueTrue(默认值)可通过按 Tab 键将焦点移到控件上。(Default) You can move the focus to the control by pressing the TAB key.
NoFalseFalse不能通过按 Tab 键将焦点移动到控件上。You can't move the focus to the control by pressing the TAB key.

创建一个窗体上的控件时,Microsoft Access 会自动将控件指定窗体的 tab 键次序中的位置。每个新控件位于 tab 键次序中的最后一次。如果要使某个控件时按 tab 在窗体中的控件,该控件的TabStop属性设置为 no。When you create a control on a form, Microsoft Access automatically assigns the control a position in the form's tab order. Each new control is placed last in the tab order. If you want to prevent a control from being available when you tab through the controls in a form, set the control's TabStop property to No.

在窗体视图中,隐藏或禁用的控件在 tab 键次序中保留但移动时的控件之间按 tab 键,即使它们的TabStop属性设置为是将被跳过。In Form view, hidden or disabled controls remain in the tab order but are skipped when you move through the controls by pressing TAB, even if their TabStop properties are set to Yes.

只要控件的启用属性设置为是,您可以单击的控件,或者使用访问键来选择它,而不考虑它的TabStop属性设置。例如,可以将命令按钮的TabStop属性设置为否以防止用户通过按 tab 键选择的按钮。但是,他们仍然可以单击命令按钮,以选择它。As long as a control's Enabled property is set to Yes, you can click the control or use an access key to select it, regardless of its TabStop property setting. For example, you can set the TabStop property of a command button to No to prevent users from selecting the button by pressing TAB. However, they can still click the command button to choose it.

示例Example

下面的示例将禁止通过 Tab 将焦点移动到“Suppliers”窗体“City”文本框。The following example disables the ability to move the focus to the "City" text box on the "Suppliers" form by using the TAB key.

Forms("Suppliers").Controls("City").TabStop = False

另请参阅See also

概念Concepts

子窗体对象SubForm Object

© 2018 Microsoft