开发者

Tab Outside Tab Control In Access 2007

My Access 2007 form has a two buttons below a tab control (with a subform on each page).

With a tab-page or button focused, I can "tab" into the subform on that page (putting focus on the first control). However, once a control in the subform has focus, I cannot "tab" out of the subform. The focus iterates through the subform controls (not the entire form).

Is there a way to change this behavior? When the last subform control has focus and the user pushes 开发者_运维百科the tab key, I want the focus to be on the first button.


On the last subform control add an [Event Procedure] to the KeyDown event for the control:

Private Sub TheSubformControl_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyTab And Shift = 0 Then Me.Parent.ButtonToFocus.SetFocus
End Sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜