Methods

A method is an action that can be performed by or on an object. When you're in your car, you can invoke the start method on the engine, invoke the release method on the parking break, invoke the shift method of the transmission, and invoke the press method of the gas pedal. All of these methods cause something to happen; in this case, they cause the car to go forward (or cause the drive method to be executed on the car itself). So, as you can see, an action or event that happens (driving) is made up of many other methods performed on many other objects.

Objects in VBA have methods as well. For example, you can invoke the LoadPicture method on a control within an Access form. This method causes a picture to be displayed within the control.

Was this article helpful?

0 0

Post a comment