重新查询子表单 [英] Requery Subform

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

问题描述

如何在主窗体中更新后根据日期范围重新查询子窗体。示例:主要表单中的预测数量已根据新的startdate和enddate进行了修订。如何重新查询子表单以修改预测数量?


感谢您的帮助。

Elizabeth

How to requery the subform based on date range after update in Main form. Example: The forecast quantity in main form was revised based on the new startdate and enddate. How do I requery the subform in order to revise the forecast quantity?

Thanks for any help.
Elizabeth

推荐答案

有两种方法可以启动重新查询代码。您可以在enddate文本框上设置After_Update事件,也可以创建一个具有On_Click事件集的按钮。无论哪种方式,您将使用以下代码(将frmSubForm替换为您的子表单的名称):

There are a couple of ways to initiate the requery code. You could setup an After_Update event on your enddate textbox or you could create a button that has the On_Click event set. Either way, you would use the following code (replace frmSubForm with the name of your subform):

< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号


对不起我迟到的回复,我试图解决它。我想我不清楚我的问题。


主表单和子表单由CodeName链接。主窗体有预测数量(Fcast)和startdate&每个CodeName的enddate)。主窗体中每个CodeName的数量在特定日期范围内不断变化。

子窗体有一个数量字段和运行日期

使用命令如何自动刷新数量基于主窗体中更改的数量的子窗体中的日期范围字段。示例:在1月15日至31日期间,主要表单中的数量更改为100

如何在1月15日到31日之间自动刷新子表单中的数量?预先感谢您的帮助。关于EOL
Sorry for my late response, I was trying to work it out. I think I am not clear with my question.

The main form and subform are linked by a CodeName. The main form has a forecast quantity (Fcast) and startdate & enddate)for each CodeName. The quantity for each CodeName in the main form keeps changing at certain date range.
The subform has a quantity field and running dates
Using a command how to auto refresh the quantity field by date range in subform based on quantity changed in the main form. Example: during Jan 15 to 31, quantity in main form changed to 100
how to auto refresh the quantity in subform between Jan 15 to 31? Thank you in advance for your help. Regards EOL


我已经阅读了几次,但我根本无法做出正面或反面。


如果计算是自动的(在查询中计算,或在控件的控件源中计算),你可以简单地按照Seth的建议进行重新查询。




如果它不是自动的,那么你需要定义并解释我们有机会帮助你的逻辑。
I have read it a couple of times, but I simply cannot make head or tails of it.

If the calculation is automatic(Calculated in query, or in the controlsource of the controls), you can simply do a requery as Seth has suggested.



If it is not automatic, then you need to define and explain the logic for us to have any chance of helping you.


这篇关于重新查询子表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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