Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Self Destruct < Startup Form | Replication ID Foreign Key >
Back to Self Destruct    Comments List
Active Clock with Current Date Upload Images   Link   Email  
Brian Hartwig       
15 months ago
In similar fashion for your countdown timer, but without the extra module function, I was able to get a live clock with the current date, active on the Main Menu form of my business database in 24 hr format. The basic code was through the aid of another developer that I came across on YouTube, as I hadn't seen reference from your site, or through YouTube, just about the calculating time for hours worked, or even this countdown timer.

In setting up the form's timer event, with the timer at 1000 ms, I set up an unbound textbox, labeled as "LiveClock". I could have used 2 lines of VBA code, but chose to use the "With" function.

Private Sub Form_Timer()
    With Me
        LiveClock.Value = Format(Date, "mm-dd-yy") & " " & Format(Time, "HH:nn")
        LiveClock.FontSize = 20
    End With
End Sub
Kevin Robertson            
15 months ago
This can be simplified.

Private Sub Form_Timer()
    With LiveClock
        .Value = Format(Now(), "mm-dd-yy hh:nn")
        .FontSize = 20
    End With
End Sub

Brian Hartwig       
15 months ago
Quacks. Though I was already aware, I just went with the quick and dirty method to put it into play.
Brian Hartwig       
15 months ago
That, and if I put it in a global module as a sub or function, it gives me the buffer to pull in the form name, by replacing "me" with a defined variable, for any additional forms I may add it to.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Self Destruct.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/24/2024 8:04:26 AM. PLT: 1s