Exercises


1. 

What are properties, methods, and events?

image from book

2. 

Name at least two ways that you can view the properties, methods, or events available for a given object.

image from book

3. 

What is the difference between the Forms collection and the AllForms collection?

image from book

Answers

1. 

Properties are characteristics of the object, such as the caption, name, or size. Methods are actions that are taken upon an object, such as setting the focus to the object. Events are triggered by actions taken by the user and the application, such as changes to data, mouse movements, a form opening, and so on. Events allow you to link up your forms and reports with the VBA code that you write so that the code will execute at the appropriate time.

2. 

You can set properties and events for a given object from the Properties dialog box in the form or report designer. You can view and manipulate properties, methods, and events from within the code window in the Visual Basic Editor as you type the object name followed by the period. The Object Browser also allows you to view the properties, methods, and events available for a selected object.

3. 

The Forms collection of the Application object only works with currently open forms. The AllForms collection of the Application.CurrentProject object allows you to work with all forms in the application.




Beginning Access 2007 VBA
Beginning Access 2007 VBA
ISBN: 0470046848
EAN: 2147483647
Year: 2004
Pages: 143

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net