VB Programing support Access Database Microsoft Office VB.Net & SQL Server nev@NevVB.com.au Sydney, Australia (02) 9453-0456 Contact Details 28/01/2012
There is a greater need to adopt a Code Naming Standard with Microsoft Access, than with any other programming language or database system. This is because a reference to an object can be so easily confused. Is the object referenced a Table or a Query or a Field or a Macro or a Textbox or a Combo Box or a Variable or a Module or a Form or a Report? All these objects can have the same name in Microsoft Access – and the Access system easily copes with the ambiguity. It will just use the first reference that it finds. By more luck than judgement the database may work as intended. But maintaining the database will be a nightmare. Just change the name of a Field or Form or Combo Box and the Access project is likely to become unstable. Note that the Name AutoCorrect option may not change all references.
These difficulties can be avoided by adhering to a Code Naming Standard. The Coding Standard should:
The result will be
These are the conventions that I use when programming a Microsoft Access database:
For a full list of prefixes for ActiveX Controls, see Microsoft's Control Naming Conventions
Adhering to a Code Naming Standard requires little effort. Trying to enforce a Standard some years after creation requires massive effort. Deleting or renaming fields in a Table can easily break an Access database system.
A Code Naming Standard is essential in making your Access Database projects easy to read, more reliable and easily maintainable.