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 
Change Textbox Backcolor on GotFocus LostFocus
Rupert 
     
14 years ago
Richard,
I did not want to bother you so often, but I posted the following on another forum and have not received any help.

I am building a database that has several forms with several textboxes on each form. I would like to provide my users with some visual aid as to where in the form they are, without having to search for the blinking cursor. I would like all my textboxes on all my forms to have a default backcolor which changes to another color when they receive focus and changes back to the default backcolor when focus is lost. At the moment, I am coding for the GotFocus and LostFocus for each textbox, but this is a pain, having so many textboxes.
Can you help me with a public function, or suggest another method to accomplish this? I really don't want to write the same code over and over again for every textbox on all my forms.
Thanks in advance for your help.
Rupert


Reply from Richard Rost:

You can create a public function to handle the actual color change, but you'll STILL have to put that function call in each of those two events for EVERY text box. I know... it's a pain... but even I don't know of any other way around it. I feel your pain... I've done something similar to this in the past myself.

You could write some VB code to actually write the rest of the VB code for you. It's POSSIBLE, and I've done it before, but I'd have to do some research to figure out how to do it again. :)

If anyone else has any ideas, I'd love to hear them.


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/18/2026 1:24:22 AM. PLT: 1s