Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Form Text Box Control Source v Name
Monica Jones 
       
3 hours ago
Traditionally these two are the same and all is right with the world. I have a database I built that relies on a SQL Server table that I inherited, and was inherited by the person before me, you get the idea. These field names are...creative. There are spaces, underscores, %, a few even have "2024 Plan" in the field name. If I "fix" the Name but leave the Control Source the same, what will I likely break and what do I need to be on the look-out for? I know it won't auto-change in the VBA and that alone may be enough for me to just suck it up (there's a lot).
TIA
Donald Blackwell  @Reply  
       
2 hours ago
If your just changing the control name and leaving the source alone, it would be just an issue of:
1) checking any actual queries that refer to that control name such as Forms!TheForm![Bad Control Name] just to make sure it changes there and also if you have any formulas in the queries (i.e. calculated fields, criteria, etc.)
2) in VBA do a search for [Bad Control Name] and set the scope to project wide. That should show you every where it is used.
3) you may need to check in SQL server tables to make sure there are not references to specific fields such as a settings table or other such, similar Richard's Dark Mode settings, etc.

Beyond that, if you really want to ensure you've covered all your bases, you could export all the objects as text files and then open those text files in any text editor and do a search for [Bad Control Name]. Or, if you're so inclined, use the methods Richard showed in the Developer courses to import them as text back into access and use the various search functions he has taught here.

Of course, in any option you choose, remember the most important thing: MAKE BACKUPS before you start.
Matt Hall  @Reply  
          
95 minutes ago
What Donald said about exporting as text is especially useful if the control name is used in properties of other controls.
Kevin Yip  @Reply  
      
36 minutes ago
Do you mean "control source" or "control name"?  When you change a table field name, the "control source" will automatically update to the new field name, but the "control name" will stay the same.  For instance, if you change a bad field name like "@bad name" to "goodname" in the table, the control source on the form will automatically update to "goodname", but the control itself will have the same old name "@bad name" that you used before.  The form will likely still work.  It's up to you to decide whether this will affect you adversely going forward.

My advice is that if you want to correct bad names, then correct them ALL.  It's better not to go through the process of asking yourself, "Should I correct this?  Should I keep this?" for every single name, which would be much more time-consuming and frustrating.  Fix them all now so you won't have to worry about them ever.

Bad names can cause all kinds of problems and should be avoided whenever possible.  For example, if a control name has a space ("My Field"), Access automatically replaces it *internally* with an underscore.  It still shows "My Field" on the screen, but it will treat it as "My_Field".  Try creating another control with the name "My_Field", and it won't let you.  This is the kind of pesky little issues, one of plenty, that you don't want hanging around in your database, causing problems down the road.
Add a Reply Upload an Image
Next Unseen

 
 
What's This?

 

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: 9/21/2026 5:52:09 PM. PLT: 0s