子窗体重新查询无法从主窗体中工作 [英] Subform requery not working from Main form

查看:91
本文介绍了子窗体重新查询无法从主窗体中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Access 2007中,我的子窗体有3个控件,这些控件使用requery宏根据前面控件中的用户选择从查询中过滤数据。当我只打开子窗体时,它工作正常。


但是,当我尝试从主窗体运行它时,参数不会传递给下一个控件。相反,我得到一个对话框来输入值。如何从主窗体中获取子窗体? Thx。

解决方案

@ pl626


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



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

展开 | 选择 | Wrap | 行号


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


-AJ


< blockquote> @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.


这篇关于子窗体重新查询无法从主窗体中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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