将输入参数从表单传递给子表单 [英] passing input parameter to the subform from a form

查看:131
本文介绍了将输入参数从表单传递给子表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要选择列的计数并将其显示在子表单上。要计算列,我需要从表单中传递参数。如何捕获参数表单并将其显示在子表单上?所有这些都在MS ACCESS 2007中。


查询是:

I need to select count of a column and display it on a subform.To count the column, I need to pass a parameter from a form. How can I capture the parameter form and display it on the subform?All this is in MS ACCESS 2007.

the query is:

展开 | 选择 | Wrap | 行号

推荐答案

请阅读 [code]标签必须使用


查询似乎很好,但你在哪里使用它?你不能将它用作控制源


我在控制源中使用它这样控制源:=(查询) 我不能把它放在记录源中,因为子窗体已经有一个记录源编辑,这导致了问题,因为它没有引用文本框查询中使用的所有表。
I am using it in the control source this way control source: =(query)I can''t put it in the record source as the subform already has a record source editing which leads to problems as the it does not have reference to all the tables used in the query for the text box.


现在我使用查询向导创建了一个查询,我使用了
= DLookUp([qrySpareparts]![InstalledQuantity],[Forms]![frmPARTS]![ ID])作为控制源

文本框中的错误现在是#Name ..

查询是一样的和之前一样.InstalledQuantity是查询的结果。
Now I have created a query using the query wizard and I have used
=DLookUp([qrySpareparts]![InstalledQuantity],[Forms]![frmPARTS]![ID]) as the control source
The error in the textbox is #Name now..
The query is the same as before.InstalledQuantity is the result of the query.


这篇关于将输入参数从表单传递给子表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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