设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 2846|回复: 6
打印 上一主题 下一主题

How To Move to another Tab on a Form

[复制链接]

点击这里给我发消息

跳转到指定楼层
1#
发表于 2005-8-17 18:50:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
标题:How To Move to another Tab on a Form  .

原作者:ATTAC Consulting Group

原文网址:http://ourworld.compuserve.com/homepages/attac-cg/AFormTip.htm#KEY

摘抄人:tmtony

翻译人:



On of the most often asked questions about  is how to move the focus from one tab to another.  The easiest way to do this is to simply set the focus to the first control on the target tab as in Me!SomeControl.SetFocus.   If you want to make your form keyboard friendly (i.e. so the user can simply hit the tab key and move between tabs on the form you can use the On Key Down event of the last control on a tab to set the focus to the next tab.  Here's the code:

ShiftDown = (Shift And SHIFT_MASK) > 0



    If KeyCode = Key_Tab or KeyCode = Key_ReturnThen

        If ShiftDown = 0 Then

            KeyCode = 0

            Me!SomeContol.SetFocus

        End if

    Else Exit Sub

    End If
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
发表于 2005-8-19 00:11:00 | 只看该作者
标题:如何如何利用Tab键随意移动焦点

请参考:http://www.office-cn.net/forum.php?mod=viewthread&tid=30876[em01][em01][em01]

[此贴子已经被作者于2005-8-18 16:49:22编辑过]

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-3 07:10 , Processed in 0.084234 second(s), 25 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表