Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Back to Evil Access Stuff    Comments List
Upload Images   Link   Email  
Spaces in Object Names
Kevin Yip 
     
3 years ago
I don't put spaces in table names and field names, because those are used frequently in VBA and SQL: Me!Field1, Select Field1 From Table1, etc.  It's not like you can use aliases for them.  You have to reference their real names all the time.  So I agree with probably every database user on Earth that it's best to have a proper naming convention for tables and fields.

But I do use spaces in form names and query names.  In fact, I use free-form names for them: [My Collection Edit Form], [Query: Movie Titles by Country], etc.  And that's because I rarely reference them in code and SQL -- because I often don't have to.  I can avoid referencing a form by name by using objects like Me and Parent.  When I close a form, I use DoCmd.Close acForm, Me.Name.  When I reference a subform, I only reference the subform control's name, not the actual name of the subform.  And if I rename a subform, the subform control automatically renames its control source.  My users always see plain-English form name at the title bar because it is always the form's name by default; if I use cryptic form names like CustomerF, I have to manually rename the form's caption every time.  I could go on, but you get the picture.  I can get away with having free-form form names (and query and report names too).  Forms are what users use the most, and I really feel having plain English names for them is a benefit.  More user-friendly for them and actually less work for me.  And if another developer takes over my database, he won't be mad, because he won't see any form names (not many anyway) in the code.  The only form names he will see are the ones on the navigation pane.
Richard Rost 
          
3 years ago
Very good points. I think the form name issue is more just a style choice for me. I do refer to a lot of other forms in my code, so it's easier to type Forms!CustomerF!CustomerID than to have to remember the silly brackets. And I generally wait until the database is finished to go back through and put on finishing touches like captions, but yeah, that's one step that your method would save.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Evil Access Stuff.
 

 
 
 

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 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/19/2025 5:50:51 AM. PLT: 1s