Difference between revisions of "Microsoft Access VBA Coding Conventions"

From database24
Jump to navigation Jump to search
Line 1: Line 1:
 +
[[Category:Microsoft Access]]
 +
[[Category:VBA]]
 +
[[Category:Conventions]]
 
== General ==
 
== General ==
 
In general please refer to the [http://wiki.vb24.net/index.php/Coding_Conventions Visual Basic Coding Convenstions].
 
In general please refer to the [http://wiki.vb24.net/index.php/Coding_Conventions Visual Basic Coding Convenstions].

Revision as of 15:43, 15 July 2010

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