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 
Orphan Control and Label names
Eduardo Benaim 
     
2 years ago
The best Practice is to name Controls from the beginning as Alex suggested.
Many times I forget to do this and later I have to rename them.
In the process I copy the code to the new control and forget to delete the old one.
Is there a way to Find all orphan controls.  
That is the ones not called from a form?
example:

Private Sub FirstnameLabel_Click()
ChangeSort "FirstName"
EndSub

was...

Private Sub Text148_Click()
ChangeSort "FirstName"
EndSub

Eduardo Benaim OP  @Reply  
     
2 years ago
Text148 is no longer called
Kevin Robertson  @Reply  
          
2 years ago
Why have you used Label as a suffix for a Textbox? That could get confusing.
Kevin Yip  @Reply  
     
2 years ago
In the module screen, select "(General)" from the top-left drop-down list, then open the top-right drop-down list to see "Text148_Click" and other obsolete procedures.
Sami Shamma  @Reply  
             
2 years ago
Edwardo

Do not copy code, 'cut' it. This way you will easily find procedures with no code in them. That is what I do. I learned that from Richard.
Better yet, once you 'cut' the code, and before you past it, delete the old procedure
Eduardo Benaim OP  @Reply  
     
2 years ago
Sami. You are right.  The problem is how do I find the ones that I missed when I was not doing this?
Sami Shamma  @Reply  
             
2 years ago
You can do a find in your VBA code for "Command" and set the search area to "Current Project" Plus what Kevin said.
Eduardo Benaim OP  @Reply  
     
2 years ago
Kevin. can you please be a little more specific.  How do I get to the Module Screen. Which is it. Some procedures will have code in it.   This is the case when you change the Name of the procedure with out deleting it.
Kevin Yip  @Reply  
     
2 years ago
Select "(General)" on the top left of the VBA code screen as shown in the picture below, then open the list on the top right will show you all the orphaned event procedures.
Kevin Yip  @Reply  
     
2 years ago

Sami Shamma  @Reply  
             
2 years ago
Kevin Y, I learned something new today. Thank you
Eduardo Benaim OP  @Reply  
     
2 years ago
Thank you kevin. This is what i was looking for.

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 10:21:34 PM. PLT: 1s