为查询提示提供值?在运行报告时 [英] Provide a value to a query prompt ? while running a report

查看:58
本文介绍了为查询提示提供值?在运行报告时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我构建了一个查询并在报告中使用它。查询有一个参数必须在运行时满足[Year_Id]。我不需要用户输入值,而是根据某些计算提供一个值,我打算在报表打开时执行该操作。我有以下代码:

I built a query and use it in a report. The query has one parameter that must be satified at run time which is [Year_Id]. Rather than user type a value, I need to provide a value based on certain calculation which I intend to do when the report is open. I have the following code:

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

推荐答案

任何想法,任何人?

谢谢你,

Salzan
Any ideas, anyone?
THank you,
Salzan


我怀疑在报告的On Open事件中进行此计算是否有效,因为查询是''在On Open事件开始之前查询'。


您将不得不向后工作并在查询本身或在打开的按钮的On Click事件中进行计算报告。


计算什么你试图表演吗?


问候,

Scott
I doubt that doing this calculation in the On Open event of your report is going to work, since the query is ''queried'' before the On Open event fires.

You''ll have to work backward and do your calculation in the query itself, or in the On Click event of a button that opens the report.

What calculation are you attempting to perform?

Regards,
Scott


我知道查询没有被执行在Report_Open之前。我通过在首先出现的代码中放置一个MsgBox来测试它,然后在我介入代码时跟随查询提示。我假设有一个与查询参数相关的控件/属性。我需要找到一种方法来访问它并设置它的价值。

Salzan
I know for fact that the query is not executed prior to Report_Open. I tested it by placing a MsgBox in the code which comes up first and then the query prompt follows as I step in through the code. I''m assuming there''s a control/attribute associated with the query paramter. I need to find a way to access it and set its valur.
Salzan


这篇关于为查询提示提供值?在运行报告时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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