
Code behind forms or Modules - which is better?
Most people in this newsgroup would relate their questions and answers to
Access since it is an Access newsgroup.
To test the difference between lightweight and none lightweight I suggest
you make two similar forms. One with code in the forms class module and one
with code in a module. Open the forms and calculate the time it took. This
will convince you to always use a lightweight form when possible.
Quote:
> I have heard this claim of improved performance for separating
> code from forms, but I have never seen any convincing proof of it. If
> Hans-Christian or anyone else has any, it would be good to see. It
> would also be good in answering this question to distinguish between VB
> and Access environments.
> IMHO, it would be hard to overcome the execution time costs of
> calling shadow routines in the module and the maintenance costs of
> trying to figure out what's happening. Perhaps if one were a diligent
> OO programmer and put business logic in the module and interface logic
> in the form, the distinction would be understandable.
> -----Original Message-----
> Posted At: Tuesday, May 11, 1999 5:14 AM
> If you use code in mudules you can create lightweight forms that perform
> much better than forms with a classmodule.