未在表和日期范围报告中显示的字段中的计算日期值 [英] Calculated Date Value in a Field not showing up in the Table and Date Ranged Report

查看:78
本文介绍了未在表和日期范围报告中显示的字段中的计算日期值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是问题,


我有一个名为Occurence且具有短日期值的表格,一旦输入它随后出现在3个字段SOL1中,增加一年,SOL2增加2年和SOL6M增加6个月到Occurence字段中输入的日期,这是通过以下控件完成的:


= DateAdd(" yyyy",1,[ Occurence])

= DateAdd(" yyyy",2,[Occurence])

= DateAdd(" m",6,[Occurence])


问题是SOL1,SOL2和SOL6M中的数据没有显示在表格中,因此我的日期范围报告除了SOL1的#Error外没有显示任何内容, SOL2和SOL6M领域


如何解决这个问题,以便我可以运行一个日期范围报告,其中显示SOL1,2,6M的值?


非常感谢任何帮助或建议。

解决方案




似乎你想将这些值保存在表中不是吗?


所以在字段[Occurence]的After Update事件中你需要键入以下内容:

展开 | 选择 | Wrap | 行号





我在更新Occurence字段后尝试输入数据这就是我得到的......


Microsoft Office Access无法找到mac ro''[SOL1] = DateAdd(" yyyy",1,[Occurence])。''


宏(或其宏组)不存在,或者宏是新的但尚未保存。

请注意,当您在参数中输入macrogroupname.macroname语法时,必须指定上次保存宏的宏组的名称。


我分别将SOL1,SOL2和SOL6M分别保留在SOL1,SOL2和SOL6M的默认控件中,并添加了[SOL1] = DateAdd(yyyy,1, [Occurence])更新后的Occurence字段。


有什么建议吗?


Ok :)


你需要选择事件程序


然后在出现的白色窗口中将其放入! :)

Here is the problem,

I have a form with a field named Occurence with a Short Date Value, once entered it subsequently appears in 3 fields SOL1 which adds one year, SOL2 which adds 2 years and SOL6M which adds 6 month to the date entered in the Occurence field, this is done with the following Controls:

=DateAdd("yyyy",1,[Occurence])
=DateAdd("yyyy",2,[Occurence])
=DateAdd("m",6,[Occurence])


The problem is that the data in the SOL1, SOL2, and SOL6M does not show up in the table and therefore my Date Range Report does not show anything except #Error for SOL1, SOL2, and SOL6M fields

How can I fix this so that I can run a Date Ranged Report with the values for SOL1,2,6M showing up?

Any help or suggestion would be much appreciated.

解决方案

Hi,

It seems that you want to save those values in a table doesn''t it?

So in After Update event of the field [Occurence] you need to type the following:

Expand|Select|Wrap|Line Numbers


Hi,

I tried entering the data after updating Occurence Field and here is what I get...


Microsoft Office Access can''t find the macro ''[SOL1]=DateAdd("yyyy",1,[Occurence]).''

The macro (or its macro group) doesn''t exist, or the macro is new but hasn''t been saved.
Note that when you enter the macrogroupname.macroname syntax in an argument, you must specify the name the macro''s macro group was last saved under.


I left SOL1, SOL2 and SOL6M in default control of SOL1, SOL2 and SOL6M respectively and added the [SOL1]=DateAdd("yyyy",1,[Occurence]) to Occurence After Update field.

Any suggestions?


Ok :)

You need to choose Event procedure

And then in the white window that appears you put that in ! :)


这篇关于未在表和日期范围报告中显示的字段中的计算日期值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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