[AccessD] Building a control class

Gustav Brock Gustav at cactus.dk
Wed Mar 4 02:39:42 CST 2009


Hi A.D.

That is correct. For a legal app or an app built by someone else you must be prepared ...

/gustav

>>> adtp at airtelmail.in 03-03-2009 19:00 >>>
Gustav,

    I agree with you and like to keep everything in VBA module. 

    However, it could so happen that another developer, relatively new to classes, tries to adopt an available control class and wishes some specific control to have an over-riding response as per =MyFunction, while allowing other controls to comply with the class behavior (preferring at the same time not to meddle with the class code itself). 

    In such a situation, conditional check within the class as suggested, could provide the required flexibility. In this context, could there be any grounds for not incorporating this feature?

Best wishes,
A.D. Tejpal
------------

  ----- Original Message ----- 
  From: Gustav Brock 
  To: accessd at databaseadvisors.com 
  Sent: Tuesday, March 03, 2009 13:17
  Subject: Re: [AccessD] Building a control class


  Hi A.D.

  You have a point. However, I really think the =MyFunction() construction is a left-over from Access 1.x which didn't feature code behind forms.
  Two reasons for this: 

  1. It is nearly impossible to locate the controls where MyFunction is used without extensive manual search or using a third-party search utility.
  2. Errors in MyFunction cannot be caught.

  /gustav


  >>> adtp at airtelmail.in 03-03-2009 06:26 >>>

  John,

      If a single class covering all controls (complete with events) were to be devised, could there be any reason not to prefer it over a host of classes control-wise ?

      While assigning "[Event Procedure]" to various events, it seems desirable to make it conditional to the event not already having been assigned some function (e.g. =MyFunction()) as otherwise the latter stands suppressed.

  Best wishes,
  A.D. Tejpal
  ------------





More information about the AccessD mailing list