[AccessD] Filtered combos - Events don't fire

jwcolby jwcolby at colbyconsulting.com
Fri Mar 6 07:31:58 CST 2009


Max,

Nothing much lateral about it.  The subform OnExit event is the only way to determine that the train 
has left the station.

The problem now is that the subform control has to reach back down into it's form and do something, 
in this case set the combos back to their unfiltered state.  If you are using a clsFrm to control 
the form, that means clsFrm has to know that the combo classes can perform this trick and clsFrm 
must expose a mCboUnfilter() method that clsCtlSfrm can call to find and unfilter all of the combos.

This is definitely doable, but how do you discuss something of this level of complexity in a lecture 
on classes?

I have the combo filter/unfilter code built in to my framework, but I had not dealt with the "focus 
leaving the subform" issue.  I am going back in to do that today.

Even so this is one of the advantages of using a framework.  Once you get it set up and functioning, 
it all just works after that.  "Program" a combo with a filtered query and it filters and unfilters 
appropriately.  Program a ctlSFrm to understand and call a method of the clsFrm to trigger the 
unfilter, and it just always does so from then on.

Consistent user interface, consistent programmer interface.

John W. Colby
www.ColbyConsulting.com


Max Wanadoo wrote:
> Hmm, that's an interesting way Gustav.
> 
> Nice lateral thinking..
> 
> Max
> 
> 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
> Sent: 06 March 2009 09:48
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Filtered combos - Events don't fire
> 
> Hi John
> 
> Use the OnEnter and OnExit events of the subform control of the main form to
> track this.
> 
> /gustav




More information about the AccessD mailing list