如何在进行记录更新时更新日期 [英] How to update date when doing record updates

查看:177
本文介绍了如何在进行记录更新时更新日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Customer数据库。我有八个字段。客户,地址,城市,州,邮政编码,电话号码和日期。当我添加新的客户记录时,我不得不插入当前日期。我遇到的问题是在更新记录(任何字段)后,我需要将日期字段设置为当前日期。我在afterupdate I put = date()上尝试了日期属性表。不行。我是否需要为所有领域做到这一点?我正在使用访问权限2003

谢谢

I created a Customer database. I have eight fields. Customer,address,city,state,zipcode,phone#directio ns,and date. When I add a new customer record, I have to problem inserting the current date. What I am having a problem with is after I update a record ( any field ), I need to set the date field to the current date. I tried on the date properties sheet on afterupdate I put =date(). Does not work. Do I need to do that for all of the fields? I am using access 2003
Thank you

推荐答案

嗨约翰,


究竟是怎样的你在做更新吗?换句话说,表是连接到一个表单,您可以在其中编辑某些字段,然后按一个按钮来更新记录,例如?我想我们可以通过更多信息让您走上正轨。谢谢。


Pat
Hi John,

How are exactly are you doing the update? In other words is the table connected to a form where you edit some of the fields and then hit a button to update the record, for instance? I think we can get you on the right track with just a little more information. Thanks.

Pat


Pat,我将表连接到表单。我选择表格,CT CUSTOMERS,并有一个表格链接到表格。我搜索我要更新的记录,更新记录(可能更改电话号码,并关闭表单。让我们说旧日期是8/8/2011,更新完成后,我需要日期字段反映当前日期,例如8/10/2011

谢谢john

也许只是一个想法,但也添加一个像(U)这样的字段只显示在那些记录上然后我可以用(U)搜索所有记录。可能是更好的方法。除了更新的记录之外的任何记录上没有(U)

再次感谢
Pat, I have the table connected to the form. I select the form, CT CUSTOMERS and there is a table linked to the form. I search of the record I want to update, update the record ( maybe changing the phone number, and closing out the form.Lets say the old date is 8/8/2011, and after the update was complete, I need the date field to reflect the current date such as 8/10/2011
Thanks john
Maybe just an idea, but also add a field like (U) to appear on only records that were updated. Then I could search on all records with a (U). Might be a better way to go. No (U) on any record other than a record that was updated
Thanks again


这没问题。还有一件事...当你完成更新记录时(可能正如你所说的那样修改电话号码) - 你只需关闭表格吗?或者在那里你点击的表格上有一些按钮 <感谢。


Pat
It''s no problem. Just one more thing...when you are done updating the record (perhaps modifying the phone number as you say) - you simply close the form? Or is there some button on the form that you hit? Thanks.

Pat


这篇关于如何在进行记录更新时更新日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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