10.1. Concept Review

Previous chapters introduced objects, methods, events, and properties. To recap the differences between these programming concepts, refer to the following table, as well as whenever necessary during the learning process. Understanding the differences between them will increase your ability to learn and understand VBA programming.

ConceptDefinitionExamples
ObjectAn entity that can be manipulated with codeForm, Report, Text box, Combo box, Command button, DoCmd, Debug
MethodAny intrinsic (built-in) functionality already assigned to an objectForm.Requery, Report..Print, TextBox.SetFocus, ComboBox.Dropdown, DoCmd.OpenForm, Debug.Print
EventAn action associated to an object that executes when triggered by the userForm.Open, Report.NoData, TextBox.AfterUpdate, ComboBox.NotInList, CommandButton.Click
PropertyAn attribute of an object that defines its characteristics (such as size, color, or screen location) or an aspect of its behavior (such as whether it is hidden)Form.BackColor, TextBox.ControlSource, ComboBox.RowSource, CommandButton.Picture, Report.Recordsource

As you can see, VBA has a very robust object model for manipulating and enhancing the Form and Report objects, and also the controls placed upon them. When learning VBA, it is very helpful to determine what object functionality already exists, so that you do not attempt to write code to perform the same task. Acquiring this knowledge requires a little memorization, a lot of repetition, and the know-how of ...

Get Access 2003 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.