Access™ 2007 VBA Programmer's Reference
by Teresa Hennig, Rob Cooper, Geoffrey Griffith, Armen Stein
Appendix L. Naming Conventions
The logic of using a naming convention is about as easy to grasp as the logic of standardizing an alphabet or language. Both structures are intended to make communication easier. In addition to providing standards, they also allow plenty of opportunities for customization. Adopting a naming convention provides for consistency, can avoid conflicts with reserved words, and sets the framework for building strong code that is more easily read and interpreted by the original developer (yes, you will likely forget why you wrote what you did) and by other developers. You may as well count on someone else trying to interpret your code, whether it is someone on your team, a technical consultant, or someone who inherits your project.
Using a naming convention also helps prevent conflicts due to multiple uses of the same name because, in most cases, a name should have only one meaning within an application.
If you are new to Access or to writing code, this is the perfect time to become familiar with the most common naming conventions and to start developing your own protocols. This appendix includes some guidance for naming objects and provides tables of the most commonly accepted names used in VBA. Now that macros have come into their own, complete with error handling, the appendix also tackles their naming considerations. Adopt, adapt, or create, it's up to you. People who choose to create their own naming conventions still benefit from being familiar with ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access