vba MS Access 2007/2003 - 从父窗体引用子窗体上的控件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3161334/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
MS Access 2007/2003 - Referencing a control on a sub form, from the parent form
提问by Justin
So if I want to reference a control (like a text box) on a sub form, from the CBF of the parent form, how should I do this?
因此,如果我想从父窗体的 CBF 中引用子窗体上的控件(如文本框),我应该怎么做?
me.SubForm.SubControl
Gives me an error.
给我一个错误。
回答by Fionnuala
Me.SubformControlName.Form.SomeControl
Be sure to use the name of the subform control, not the form contained - they are often the same, but not always.
确保使用子表单控件的名称,而不是包含的表单 - 它们通常相同,但并非总是如此。
More info: http://www.mvps.org/access/forms/frm0031.htm