Clock in the switchboard

GeorgeChr

Registered User.
Local time
Today, 13:56
Joined
Jun 26, 2007
Messages
24
Hello all!! i have created a very nice s/b and i want to add a clocck in it. I've tried the same way as in forms (label, adding the code in the form etc.) but it didnt work. Can anyone specify the exact code i have to enter? thanks in advance!
 
Do a search, this was covered last week.

You need to create a text field - use the Time() function and also the On Timer event and the time interval will be 1000

Col
 
Here's a thing I use. You'll need a textbox called txtOmega (yeah, I'm a watch fanatic) and you'll maybe want to add some cosmetics to it, like a frame around it. If you'd also like to show the date, add a textbox called txtDayRunner.

Goto your form’s property box. Under the Event Tab find Timer Interval and enter 1000.

Code:
Private Sub Form_Open(Cancel As Integer)
'Displays while waiting for timer to crank up    
    Me.txtOmega = Time 
    Me.txtDayRunner = Date
End Sub

Private Sub Form_Timer()
    Me.txtOmega = Time 'Display time
    Me.txtDayRunner = Date 'Display date
End Sub

Good Luck!
 
There is a simle way to do this in access for those who want to simply do this.


  1. Open the form or report in design
  2. On the Insert menu, click Date And Time.
  3. To include a date, select the Include Date check box, and then click a date format.
  4. To include the time, select the Include Time check box, and then click a time format.
The only problem is the clock won't automatically update for you but all it is is 2 text boxes one with =Date() as a control souce the other as =Time()

This isn't as good as other ways since it isn't real time but just thought to point it out for less experienced users
 
A clock usually means something that displays the current time, which your method doesn't. Why would you add to an almost two year old thread with an irrelevant post?
 

Users who are viewing this thread

Back
Top Bottom