Microsoft Access VBA Coding Conventions

From database24
Revision as of 15:43, 15 July 2010 by Dec (talk | contribs)
Jump to navigation Jump to search

General

In general please refer to the Visual Basic Coding Convenstions.

Indentation

The indentation size is 4.

Empty lines

Variables

  • Early binding
  • No globals
  • No abbreviations
  • Make use of the variable type prefix

Access Classes

Forms

  • Group
    • Form event procedures
    • From control event procedures
    • Methods

Reports

Function

Name

The function name starts with a verb in lower case.

Result

The result variable is declared as first variable and the result assignment is the last statement in every function.

Conditions

  • If, ElseIf, Else, End If

Loops

  • Do Loop
  • Not: While Wend

Classes