将子窗体退出到主窗体 [英] Exit subform to main form

查看:92
本文介绍了将子窗体退出到主窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为frmPackingSubEntry的子表单,其中包含一个名为packingId的字段。此子表单采用名为frmPacking的形式。我希望能够跳出子表单字段并进入主表单的PackingDate字段。我可以使用AfterUpdate吗?怎么样?


感谢您的帮助

I have a subform named frmPackingSubEntry with one field in it called packingId. This subform is in a form called frmPacking. I would like to be able to tab out of the subform field and into the field PackingDate of the main form. Can I do this using AfterUpdate? and How?

Thanks for any help

推荐答案

@DAHMB


嘿DAHMB,


我很遗憾地说,一旦你处于子表单中,就无法访​​问主表单控件了,直到您只需单击主窗体上的控件。我目前不熟悉任何可以让你这样做的控制和技巧。


您可能想要考虑重新设计表单,看看是否有办法将所有时间保留在主表单上,或者如果需要有子表单,则在转到子表单之前将所有项目输入主表单。


希望这有帮助,


Joe P。
@DAHMB
Hey DAHMB,

I''m sorry to say that once you''re in the sub form, there isn''t any access to the main form controls at all, until you simply click on a control on the main form. I''m not currently familar with any controls and or tricks that would allow you to do that.

You may want to consider a form redesign to see if there is a way to either keep all times on the main form, or if there is a need to have a subform, then to have all the items entered on the main form before going to the sub form.

Hope that helps,

Joe P.


@DAHMB


你实际可以' '模仿''这种行为。在Tab顺序中子表单中最后控件的LostFocus()事件中,放置以下代码行。当您在子窗体中的最后一个控件中按TAB键时,控件将失去焦点,然后将焦点放在主窗体中的所需字段上:
@DAHMB
You can actually ''mimic'' this kind of behavior. In the LostFocus() Event of the ''Last'' Control in the Sub-Form in Tab Order, place the following line of code. When you press the TAB Key while you are in this Last Control in the Sub-Form, the Control will lose Focus, and subsequently place the Focus on the desired Field in the Main Form:
展开 < span class =codeDivider> | 选择 | Wrap | Line数字


多亏了我需要的东西!


这篇关于将子窗体退出到主窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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