Refresh Time on a form

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

Guest

I have database to keep track of customer calls. It has a form that one of
the fields display's the current time when you open it. The code reads
"Time.Value = Now()" My problem is if a user leaves the form open the time
does not update. So when they key in information the correct time is not
being added to the table.
Any suggestion? Is it possible to have a running clock? Thanks.
 
Hi

Create a lable called EAHortonSrClock (or whatever)

Set the forms timer interval to 1000

In the forms OnTimer row create this code


Private Sub Form_Timer()
Me!EAHortonSrClock.Caption = Format(Now, "dddd, mmm d yy, hh:mm:ss AMPM")
End Sub

Of course you can change the format to whatever you want. In fact the
seconds ticking away would be a little irritating - so I would change it, I
have just given you this just so you can see how it works

Have fun
 

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