且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

子窗体重新查询无法从主窗体中工作

更新时间:2023-02-05 18:11:52

@ pl626

我的子表单有3个控件使用requery宏根据前面控件中的用户选择从查询中过滤数据



您是指子表单上的组合框吗?如果是这样(完整语法):

展开 | 选择 | Wrap | 行号


您需要提供更详细的技术说明,说明您在做什么。但是,如果我猜测,听起来像你可能有一个主孩子链接问题,从主要形式到子形式。


-AJ


@ADezii


是的,我在子表单中有3个组合框。据我了解,该代码应该在主窗体上正确吗?该代码应分配给哪个事件,''获得焦点''? THX。

In Access 2007, my subform has 3 controls that filter data from queries based on user selections from the preceding controls using the requery macro. It works fine when I have only the subform open.

However, when I try to run it from the main form, the parameters do not pass to the next control. Instead, I get a dialog box to input the value. How do I get the subform to work from the main form? Thx.

@pl626
my subform has 3 controls that filter data from queries based on user selections from the preceding controls using the requery macro

Are you referring to a Combo Box on a Sub-Form? If so (Full Syntax):

Expand|Select|Wrap|Line Numbers


You need to give a more technically detailed explanation on what it is you are doing. But if I were to guess, sounds like you may have a master-child linking issue, from the main form to sub form.

-AJ


@ADezii
Yes, I have 3 Combo Boxes in the Sub-form. As I understand it, that code should be on the main form correct? For which event should this code be assigned, ''On Got Focus''? Thx.