CUSTOMIZING A FORM

In Access 2, you had to live with a predefined set of properties and methods. Today, VBA lets you define your own additional form properties. With VBA, you can create properties and methods that can be referenced just as though they were built in. You're now ready for the next step of adding public properties and methods to the form.

Note

The forms created in this section are on the CD-ROM in the back of this book in the Chap02.mdb file, located in the \Examples\Chap02 folder.

Writing Custom Properties

You can expose a form in two ways. The first way, which is very simple, is just to expose a form variable as public. This is done by placing the keyword Public in front of the variable's declaration. Follow these steps:

1. ...

Get F. Scott Barker's Microsoft® Access 2000 Power Programming 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.