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 
Which Event Fires When Focus Changes
Tom Mauldin 

16 months ago
I want setup a case statement that when focus leaves one textbox to another I can change the color of the box to show focus. Which event fires when the focus changes. I have tried sever form events and none of them work. Thanks
John Davy  @Reply  
         
16 months ago
Hi Tom, Sometimes you can do a little test to solve a problem.
Private Sub T1_LostFocus()
    Beep
End Sub

HTH John
Alex Hedley  @Reply  
           
16 months ago
As an aside, it's not exactly what you asked for but I recorded a tip quite a few years back that might give you some ideas:

Access Tip: Check a Form for Blank Controls
Kevin Robertson  @Reply  
          
16 months ago
Try this (see screenshot). It will set the Backcolor of any Text Box or Combo Box that has focus and return to the default Backcolor (white) when the control loses focus. If the control is not white it will not change. Modify for your needs.
Kevin Robertson  @Reply  
          
16 months ago

Tom Juric  @Reply  
     
16 months ago
Alex, I tried to visit the link you provided but all i got was "This thread is closed...."  I would like to see that code
Alex Hedley  @Reply  
           
16 months ago
It had a link to a YouTube video in the main body:
https://www.youtube.com/watch?v=fe5D4iK0Pvk
Tom Juric  @Reply  
     
16 months ago
Thanks!! I got it.
Tom Mauldin OP  @Reply  

16 months ago
Kevin I have tried your code and I can't get it to work.  It never call the functions and the backcolors never change. Not sure what I am doing wrong.
Matt Hall  @Reply  
          
16 months ago
To test if and when the events fire, you can make a simple form and populate the events you are interested in with a msgbox function.  Use the name of the event as the message so you know what fired.  E.g.,   msgbox "after_update".

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/6/2026 3:53:12 PM. PLT: 3s