how to insert system time in access form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i would like to insert system time in a form that I am designing which should
updating automatically by each second
 
Do you want to update a field in a table, or you just want to display the
current time?
The function Time() will return the current time.

If you want to insert the time when a new record added to the table, then
set the default of the field to
=Time()
If you want to update the time field everytime the record is updated, then
on the BeforeUpdate event of the from, you can assign the time to this field
Me.FieldName = Time()
======================================
If just want to display the current time on the form, there might be some
control that would do that for you, but you can use the form Ontimer event to
update the time every period of time that you decide, using the
Me.FieldName = Time()
========================================
To get the system date use
Date()
To get the Current Date and time, use
Now()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top