• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

3. Entry and Navigation > 25. Put a Clock on a Form

Put a Clock on a Form

Give users the time and date, even for more than one time zone.

By combining a form’s On Timer event, its timer interval, and the system clock, you can place a functional clock on a form.

Figure 3-22 shows a form with a clock in the header. Its placement in the header, and not in the details section, makes sense because it is unbound and isn’t specific to any record in the detail.

You can go about your business moving through records, editing data, and so on; the time will just keep ticking away undisturbed.

Creating the Clock

The clock is easy to create. First, place a label control on the form. Then, set the form’s timer interval to 1,000 (which equals one second). Finally, place a single line of code in the form’s On Timer event:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint