Use controls to document Access forms, reports, and controls

June 26, 2009 by wizTEQ Staff  
Filed under Tip of The Day

Developers know that good code contains meaningful comments that document their choices and unusual situations. You just preface the text with an apostrophe character (’), so that VBA ignores the line. Later, you, or other developers who maintain the database can quickly peruse the comments instead of interpreting code.

You can also share comments about a form, report, or control’s design with other developers using hidden controls in a form. It’s an innovative albeit non-traditional use for controls — usually, a label control. By setting such a control’s Visible property to No, the control is visible only in Design view. When you or another developer opens the form in Design view, there’s your comments. This type of commenting is especially helpful when the object requires no module, which is where you store more traditional commenting.






Comments are closed.