设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

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

[窗体] 获得值后返回控件焦点

[复制链接]
跳转到指定楼层
1#
发表于 2010-6-2 22:38:33 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 luhao 于 2010-6-2 22:42 编辑

不知怎用 Screen.ActiveControl去解决 ,请老师们指教

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
 楼主| 发表于 2010-6-3 18:56:50 | 显示全部楼层

尝试

本帖最后由 luhao 于 2010-6-3 19:01 编辑

2# todaynew
我尝试了这样的函数,提不示:表达式引用了一个关闭或不存在的对象
Private Sub List0_DblClick(Cancel As Integer)
    If ActiveFormForm_SFiler筛选排产主表数据 = ActiveForm Then
        Form_SFiler筛选排产主表数据.ActiveControl = Me.List0.Column(0)
        DoCmd.Close acForm, "S筛选数据FrilersFile"
    End If
   
    If ActiveFormForm_SFiler筛选排产订单明细 = ActiveForm Then
        Form_SFiler筛选排产订单明细.ActiveControl = Me.List0.Column(0)
        DoCmd.Close acForm, "S筛选数据FrilersFile"
    End If
End Sub
3#
 楼主| 发表于 2010-6-4 02:20:14 | 显示全部楼层
4# todaynew
如果只有一个条件
    If ActiveFormForm_SFiler筛选排产主表数据 = ActiveForm Then
        Form_SFiler筛选排产主表数据.ActiveControl = Me.List0.Column(0)
        DoCmd.Close acForm, "S筛选数据FrilersFile"
    End If

就运行正常的.
但2个条件就出错了
4#
 楼主| 发表于 2010-6-4 03:28:12 | 显示全部楼层
4# todaynew 最后用了
Private Sub List0_DblClick(Cancel As Integer)
    If CurrentProject.AllForms("SFiler筛选排产主表数据").IsLoaded = True Then '判断窗体是否打开
        Form_SFiler筛选排产主表数据.ActiveControl = Me.List0.Column(0)
        DoCmd.Close acForm, "S筛选数据FrilersFile"
    End If

   
    If CurrentProject.AllForms("SFiler筛选排产订单明细").IsLoaded = True Then '判断窗体是否打开
        Form_SFiler筛选排产订单明细.ActiveControl = Me.List0.Column(0)
        DoCmd.Close acForm, "S筛选数据FrilersFile"
    End If
End Sub
测试通过
5#
 楼主| 发表于 2010-6-4 22:36:04 | 显示全部楼层

不会

8# todaynew
弹出方式和模式 都选是就不会出错了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-13 14:42 , Processed in 0.100047 second(s), 29 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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