John W. Colby
jwcolby at colbyconsulting.com
Wed Mar 10 23:11:22 CST 2004
I am working on a dependentobjects class, i.e. a class with a collection which holds objects (classes) where the control or form is dependent on the current control. Combo A changes. Combo B uses Combo A to filter itself. Combo B is "dependent" on combo A and must be requeried whenever Combo A changes. There is a case where two combos on a form may display data from the same table. For example two combos both display cities from the cities lookup table. If Combo A NotInList adds a new city. Combo B needs to requery in order to display that new city if necessary. However if Combo B adds the city, then Combo A needs to requery. Obviously if we add combo A to combo B's DependentObject collection and we add Combo B to Combo A's dependent object collection, then we start an endless loop where A requeries B which requeries A which requeries B... This is a case where I programmed a solution working but it was ugly. How would you solve this problem? John W. Colby www.ColbyConsulting.com