Computer Learning Zone CLZ Access Excel Word Windows

If we don't believe in freedom of expression for people we despise, we don't believe in it at all.

-Noam Chomsky
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Visitor Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Sleep Not Updating Screen
Tim Hale 

2 years ago
I enjoyed seeing your sleep function video recently and it works well the way you used it but I am having a problem pausing between functions.  
The basic example below should;
Change detail back colour and beep then 1 second later change the Header Color , Bleep and 1 second later change the footer color.

But instead it Bleeps then 1 second later Bleeps again and then the back color, Header color and Footer color all change at the same time, so it looks like the code isn't reading in the correct order.

Can this sort of pause be done please?? and why does it read the code in the wrong order?

DetailsPrivate Sub SingleB_Click()

Detail.BackColor = vbBlue
Beep
Sleep 1000
FormHeader.BackColor = vbGreen
Beep
Sleep 1000
FormFooter.BackColor = vbYellow

End Sub
Richard Rost  @Reply  
          
2 years ago
You need to throw a DoEvents in there so that Access can "do stuff" like update the screen. Put one before each of your Sleep statements.
Tim Hale OP  @Reply  

2 years ago
Thank you for your quick reply yes that fixed my example problem and it will fix my actual database. Richard, Thank you for the great job you are doing, your videos are great.
Sami Shamma  @Reply  
             
2 years ago
Hi Tim

I was like you, looking from the outside into Richard's world.
My becoming a member was the best thing I have ever done to improve my skills.
Richard Rost  @Reply  
          
2 years ago
You're very welcome. Glad to help.
Richard Rost  @Reply  
          
2 years ago
Watch this too: Reminder Popup

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Visitor 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/6/2026 10:55:09 AM. PLT: 1s