报告中的文本框的Dsum作为ControlSource不起作用 [英] Dsum as ControlSource for text box on report not working

查看:68
本文介绍了报告中的文本框的Dsum作为ControlSource不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在报告上有一个文本框,我需要让dsum返回总数。

我需要总计的记录不在报表的记录源表中,为了进一步复杂化,我需要使用从报表后面派生的变量dsum的标准。


当我试图看到打印预览时,这个版本的语句错误之前打开说Access无法找到字段'SavingsPeriodEndDate''在你的表达式:

Me.Text127.ControlSource =" = DSum(''[CostPerPaycheck]'',''tblSavingsFunds'',''[FundsStatus] ='''等待''和# ;& [nextpayday]&"#< =#"& [SavingsPeriodEndDate]&"#'')"


[SavingsPeriodBeginDate]和[FundStatus ]是tblSavingsFunds中的字段。

nextpayday是在此控制源语句为(report_open)的相同代码段中设置的日期变量。


谢谢

Hi,
I have a text box on report where I need to have dsum return a total.
The records I need the total from are not in the table that is the report''s recordsource, and to complicate things further, I need to use a variable that is derived from behind the report in the criteria for the dsum.

When I try to see print preview, this version of the statement errors before opening saying "Access cannot find the field ''SavingsPeriodEndDate'' referred to in your expression":
Me.Text127.ControlSource = "=DSum(''[CostPerPaycheck]'',''tblSavingsFunds'',''[FundsStatus] = ''Waiting'' and #" & [nextpayday] & "# <= #" & [SavingsPeriodEndDate] & "#'')"

[SavingsPeriodBeginDate]and [FundStatus] are fields in tblSavingsFunds.
nextpayday is a date variable set in the same section of code where this controlsource statement is (report_open).

Thank you

推荐答案




我在报告上有一个文本框,我需要让dsum返回总数。

我需要总计的记录不在报表的记录源表中,为了进一步复杂化,我需要使用从报表后面派生的变量dsum的标准。


当我试图看到打印预览时,这个版本的语句错误之前打开说Access无法找到字段'SavingsPeriodEndDate''在你的表达式:

Me.Text127.ControlSource =" = DSum(''[CostPerPaycheck]'',''tblSavingsFunds'',''[FundsStatus] ='''等待''和# ;& [nextpayday]&"#< =#"& [SavingsPeriodEndDate]&"#'')"


[SavingsPeriodBeginDate]和[FundStatus ]是tblSavingsFunds中的字段。

nextpayday是在此控制源语句为(report_open)的相同代码段中设置的日期变量。


谢谢
Hi,
I have a text box on report where I need to have dsum return a total.
The records I need the total from are not in the table that is the report''s recordsource, and to complicate things further, I need to use a variable that is derived from behind the report in the criteria for the dsum.

When I try to see print preview, this version of the statement errors before opening saying "Access cannot find the field ''SavingsPeriodEndDate'' referred to in your expression":
Me.Text127.ControlSource = "=DSum(''[CostPerPaycheck]'',''tblSavingsFunds'',''[FundsStatus] = ''Waiting'' and #" & [nextpayday] & "# <= #" & [SavingsPeriodEndDate] & "#'')"

[SavingsPeriodBeginDate]and [FundStatus] are fields in tblSavingsFunds.
nextpayday is a date variable set in the same section of code where this controlsource statement is (report_open).

Thank you



和SavingsPeriodEndDate在哪里?

And where is SavingsPeriodEndDate located?


对不起,我混淆了并键入了错误的字段名称。 SavingsPeriodEndDate也是表tblSavingsFunds中的一个字段。
Sorry, I got mixed up and typed the wrong field name. SavingsPeriodEndDate is also a field in the table tblSavingsFunds.


它应该是:

"#< = [SavingsPeriodEndDate])"
It should be this:
"# <= [SavingsPeriodEndDate])"


这篇关于报告中的文本框的Dsum作为ControlSource不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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