确定活动控件中的子窗体名称 [英] Determine Subform name from active control

查看:55
本文介绍了确定活动控件中的子窗体名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含4个子表单的表单,名为xfmMain_subLT,xfmMain_subLB,xfmMain_subRT和xfmMain_subRB。

I have a form with 4 subforms, named xfmMain_subLT, xfmMain_subLB, xfmMain_subRT and xfmMain_subRB.

SourceObject属性由VBA代码动态分配。任何可能的SourceObject都有一个具有相同名称的组合框和一个AfterUpdate事件,该事件使用唯一的参数ActiveControl调用一个函数。

The SourceObject property is dynamically assigned by VBA code. Any possible SourceObject has a combobox with the same name and an AfterUpdate event which calls a function with the only argument ActiveControl.

在函数中我需要知道哪个子表单(... LT,LB,RT或RB)分配了这个SourceObject。

In the function I need to know to which subform (…LT, LB, RT or RB) this SourceObject is assigned.

TIA,Norbert Meiss

推荐答案


在我需要的功能中知道这个SourceObject被分配到哪个子表单(... LT,LB,RT或RB)。

In the function I need to know to which subform (…LT, LB, RT or RB) this SourceObject is assigned.

您好Norbert,

您尝试过吗? ActiveControl.Name?

Did you try  ActiveControl.Name?

Imb。


这篇关于确定活动控件中的子窗体名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆