[AccessD] A Good Reason for a Class

Arthur Fuller fuller.artful at gmail.com
Sun Mar 2 16:01:09 CST 2008


I'm doing a traditional (MDB) app with one minor twist. The form's controls
are (almost all) read-only until the user elects to update the data. At that
point the Save button becomes enabled and remains enabled until the user
saves the data, and then we're back to read-only.

As a first pass, I simply set the form's AllowEdits to False, then switched
it to True when the user clicks the button. Easy enough. But now I want to
add some functionality, at least cosmetic. I want the controls to display in
a color such as grey when they cannot be edited, and then white when they
can be edited, and finally I want the control that has focus to change to
yet another color and change back when it loses the focus.

I've got an idea that this is an occasion when I should create a class and
make all the controls inherit some of that class's behavior. I'm not sure
how to begin this exercise. What should I do? JC, are you awake?

TIA,
Arthur



More information about the AccessD mailing list