Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Time alarm conditionalformat
Masih Ostad Novin 
     
3 years ago
Dear Richard. I have an unbound text box that displays time (clock). Can we format the box with conditional formatting that when clock stikes 8:00 am its background turns red with a sound, like an alarm clock? Thanks.
Masih from Stockholm
Alex Hedley  @Reply  
           
3 years ago
What have you tried?
Kevin Robertson  @Reply  
          
3 years ago
Try this.

I have added the current time which is to the second purely for the screenshot. This is not important for the code to work as I use the Time() function. Try it, modify it and let us know how it works out for you.
Kevin Robertson  @Reply  
          
3 years ago

Masih Ostad Novin OP  @Reply  
     
3 years ago
Dear Kevin. Thanks for your precious time. I tried it but it turned error. I post it here down below.
Masih Ostad Novin OP  @Reply  
     
3 years ago

Masih Ostad Novin OP  @Reply  
     
3 years ago

Kevin Robertson  @Reply  
          
3 years ago
Do you have a Default Value in the Target Time text box?
I used this for 1 minute after the current time.

=DateAdd("n",1,Time())

Or you could  have the form load with a static time (such as 8:00 am).

Private Sub Form_Load()

    txtTargetTime = #8:00:00 AM#
    
End Sub


Also, check for a NULL value in the After Update event.

Private Sub txtTargetTime_AfterUpdate()

    If IsNull(txtTargetTime) Or txtTargetTime = "" Then
        txtTargetTime = DateAdd("h", 1, Time())
    End If
    
End Sub
Masih Ostad Novin OP  @Reply  
     
3 years ago
OK thanks. But nothing happens. As you show above. I don't get any error messages either.

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

Next Unseen

 
New Feature: Comment Live View
 
 

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 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 2:29:17 AM. PLT: 0s