html表单 当前年月日_有没有办法在表单上显示当前日期和时间?

I used =now() in a text box and that nicely displays date and time at

the moment of opening

How would I show updated data?

I thought of an event procedure, but which one would I use since there

really isn''t any data choosing or mouse event associated with the

date/time update

Jerry

解决方案Try the "On Timer" event.

wrote in message

news:ol********************************@4ax.com...I used =now() in a text box and that nicely displays date and time at

the moment of opening

How would I show updated data?

I thought of an event procedure, but which one would I use since there

really isn''t any data choosing or mouse event associated with the

date/time update

Jerry

wrote in message

news:ol********************************@4ax.com...I used =now() in a text box and that nicely displays date and time at

the moment of opening

How would I show updated data?

I thought of an event procedure, but which one would I use since there

really isn''t any data choosing or mouse event associated with the

date/time update

Jerry

You want to show a ''working clock'' on your form which just displays the

current time and is not bound to any data? You could use the form''s Timer

event and update every minute, second or whatever.

Or are you talking about showing the date and time a record was created or

amended?

je*********@pioneer.com wrote:I used =now() in a text box and that nicely displays date and time at

the moment of opening

How would I show updated data?

I thought of an event procedure, but which one would I use since there

really isn''t any data choosing or mouse event associated with the

date/time update

The forms in Microsoft Access have a Timer event.

For a form named frmMain with a label lblTime, you''d have code that

looks something like this:

Private Sub Form_Load()

With Me

.TimerInterval = 1

End With

End Sub

Private Sub Form_Timer()

with Me

.lblTime.Caption = Now()

End with

End Sub

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值