[AccessD] A Good Reason for a Class

Gustav Brock Gustav at cactus.dk
Sun Mar 2 16:21:49 CST 2008


Hi Arthur

Yes, that's a good reason.
Look up the thread in December, "events question":

http://databaseadvisors.com/pipermail/accessd/2007-December/057437.html 

/gustav

>>> fuller.artful at gmail.com 02-03-2008 23:01 >>>
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