O'Reilly logo

Access™ 2007 VBA Programmer's Reference by Armen Stein, Geoffrey Griffith, Rob Cooper, Teresa Hennig

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required