如何在ms access 2000数据库中存储计算出的控制值 [英] How to store calculated control value in ms access 2000 database

查看:56
本文介绍了如何在ms access 2000数据库中存储计算出的控制值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是这个ms access 2000的新手。我创建了一个表单,我创建了计算控件。计算出的控制值没有存储在数据库中。

任何人请帮助我。


谢谢

解决方案


i这个ms access 2000的新手。我创建了一个表单,我创建了计算控件。计算出的控制值没有存储在数据库中。

任何人请帮助我。


谢谢



您好sarahraj,


请详细说明您想要实现的目标,以便贡献者能够更准确地回答您


谢谢


Jim:)


我正在使用ms access 2000.在表单中我创建了3个文本框控件。我正在输入两个date.i我正在计算这个月的差异我用这个exp:

txtMonthsOverdue = DateDiff(" m",[txtTargetCompletionDate],[txtRevisedCompletionDate])


现在问题是计算出的值是在表单中显示而不是在数据库中显示


你可以用plzzzzzzz帮助我吗


问候,

Sarah


显然,需要提出的第一个问题是Is txtMonthsOverdue 绑定到基础表/查询中的字段?在属性框中,它是否有控制源框中列出的内容?


另外值得关注的是您对Month的使用(m)作为你的间隔。使用m。和日期10/31/2007和11/01/2007,DateDiff将产生1个月,实际上,这两个日期相隔仅1天!根据您的需要,使用间隔天数(d)可能会更好。如果你想要几个月和几个月的时间,你可以将DateDiff产品除以30或31.


或者我可以给你一小段代码,这些代码可以在几天内和返回两个日期之间的年/月/日。


欢迎来到TheScripts!


Linq ; 0)>

i am new to this ms access 2000. i have created a form in that i have created calcualte control. the calculated control value is not storing in the datebase.
Anyone pls help me.

Thanks

解决方案

i am new to this ms access 2000. i have created a form in that i have created calcualte control. the calculated control value is not storing in the datebase.
Anyone pls help me.

Thanks


Hi sarahraj,

Please explain a little more about what it is you are trying to achieve so that contributors can answer you more precisely

Thanks

Jim :)


I am using ms access 2000. In form i created 3 textbox controls. I am entering the two dates.i am calculating difference between the months for this i used this exp:
txtMonthsOverdue=DateDiff("m",[txtTargetCompletionDate],[txtRevisedCompletionDate])

now the problem is the calculated value is displaying in the form but not in the database

Could you plzzzzzzz help me

Regards,
Sarah


Obviously, the first question that needs to be asked is "Is txtMonthsOverdue bound to a field in the underlying table/query?" In the Properties Box, does it have anything listed in the Control Source box?

Also of concern is your use of Month ("m") as your interval. Using "m" and the dates 10/31/2007 and 11/01/2007, DateDiff will yield 1 month, when, in fact, the two dates are only 1 day apart! Depending on your needs, using an interval of days ("d") perhaps would be better. If you want months and parts of months you could then divide the DateDiff product by 30 or 31.

Or I can give you a short bit of code that will take the difference in days and return the years/months/days between two dates.

Welcome to TheScripts!

Linq ;0)>


这篇关于如何在ms access 2000数据库中存储计算出的控制值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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