Charlotte Foust
charlotte.foust at gmail.com
Wed Aug 8 09:11:33 CDT 2012
And I do it differntly still. My class accepts a form as an argument in it's init routine, which is called from the form. The form declares a variable mFrm as New clsForm and then instantiates the variable like this: mFrm.init Me We all seem to approach it from a slightly different angle depending on what we want to do. Charlotte On Wed, Aug 8, 2012 at 4:43 AM, A.D. Tejpal <adtp at airtelmail.in> wrote: > It is observed that for trapping custom events raised in a form, > WithEvents pointer in a new class needs to be declared as that form's class > object, as per sample statement below: > > ' Sample code in class module > '============================== > Private WithEvents mfm As Form_MyForm > '============================== > > However, the resulting object does not expose built-in events of the > form (like Load, Current etc). > > On the other hand, declaring it as Access.Form makes available all the > normal events of a form but not the custom events. > > For getting access to both sets of events, it is found necessary to > set up two separate pointers, one as Access.Form and the other as > Form_MyForm. > > Could there be a better course of action? > > Best wishes, > A.D. Tejpal > ------------ > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > >