[AccessD] Filtered combos - Events don't fire

Max Wanadoo max.wanadoo at gmail.com
Fri Mar 6 07:41:54 CST 2009


I suggest we get everybody up to speed on classes and withevents first.  I
am waiting your document so that I can work through it.  I don't like having
to do a bit and then wait for the next post.

Max



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: 06 March 2009 13:32
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Filtered combos - Events don't fire

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

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list