Creating a working clock on my form

DeeDee

Registered User.
Local time
Today, 03:54
Joined
Jun 23, 2010
Messages
14
Hi All

I am trying to follow a simple instruction adding a working clock on my Main Form of my database. For some reason the clock is just not displaying and would like to know if someone can have a look at it for me please?


I am trying to follow this instructions:

To put a simple text clock on a form, create a Label called lblClock on the form, set the form's TimerInterval to 1000, and the following code behind the Timer Event.
***************** Code Start ***************
Private Sub Form_Timer()
Me!lblClock.Caption = Format(Now, "dddd, mmm d yyyy, hh:mm:ss AMPM")
End Sub
***************** Code End***************



The highlighted section on the MainForm.jpg is where I want the clock to show:
I want it to look like clock.gif file.

Please if anyone can show me where I am going wrong will really appreciate it.

Thanks
 

Attachments

  • MainForm.jpg
    MainForm.jpg
    67.5 KB · Views: 508
  • propertysheet_form.jpg
    propertysheet_form.jpg
    52 KB · Views: 408
  • propertysheet_lblClock.jpg
    propertysheet_lblClock.jpg
    58.9 KB · Views: 421
  • code.jpg
    code.jpg
    77.1 KB · Views: 437
  • clock.gif
    clock.gif
    3.6 KB · Views: 491
Last edited:
not looked, but you need to put a timer interval in the properties of the timer - it will need to be 1000 to fire every second, i think.

have you missed that.?
 
Hi Dave

Thanks for the reply, if you have a look at my second screen shot I do have the timer interval in there. So not sure what else could be wrong.
 
Hi Dave

Thanks again but I think I managed to fix the problem. Just done some more testing and this time around the updated time does appear.

Thanks for looking at it anyway
 
glad you got it working.

it was bedtime, so it was just a thought. I didnt actually look at your jpegs!
 
Have you thought about placing a custom status bar on the bottom of your form. There are inbuilt panels that allow you to insert the Date and or Time into the panels which is automatically updated by windows not access and is a real time ticking clock.

You will find this in ActiveX controls

Microsoft Forms 2.0 Status Bar.
 
This is a image I supplied to another poster a while ago. As you can see the date and time appear on the right of the status bar.
attachment.php
 

Attachments

  • statusbar.JPG
    statusbar.JPG
    28.6 KB · Views: 2,461
My Access 2007 only has Microsoft StatusBar Control 6

Is there a web page on programming Active X
 
Last edited:
As the screen dump suggests you can add panels to the status bar using the status bar properties - not the control properties. Then you can simply fire things to the appropriate panels as it suggests on the screendump.

If you want more info I will knock up a demo for you.
 
As the screen dump suggests you can add panels to the status bar using the status bar properties - not the control properties. Then you can simply fire things to the appropriate panels as it suggests on the screendump.

If you want more info I will knock up a demo for you.

In general, is there some Properties god somewhere in charges of the all of the properties availible on all posible controls?

Well maybe we could start with the most common ones.
 
Right click on the status bar and go to <NameOfStatusBar>Properties

You should get this wizard
attachment.php


You will find all the status bar properties here.
 

Attachments

  • statusbarproperties.JPG
    statusbarproperties.JPG
    31.5 KB · Views: 2,386

Users who are viewing this thread

Back
Top Bottom