John W. Colby
jwcolby at colbyconsulting.com
Wed Mar 24 20:46:12 CST 2004
>I don't see exactly where to tell the fw that , for example, on 2 different combo's Not In List, I want combo1 to pop a form for data-entry, but combo2 to silently undo and reject the newdata. Should this be set in the Tag property? First of all I abandoned all Tag usage ages ago, with the sole exception of subform controls. I did so because so many people were using them using so many "syntaxes" for storing their data that it became dangerous to use them since my stuff might be lost because of what someone else did. I don't particularly like using the tag for subforms but I adopted a "syntax" where if the tag had a subform name but the Source Object property was cleared then when the tab was clicked copy the tag to the SourceObject property. This became very handy for setting / clearing JIT subform processing during troubleshooting and I just never figured out another way. I now directly program a specific control class to enable a specific behavior in the form's Open event. In my framework that is the only event I use routinely, as a matter of course. You might have noticed in the example code a line that looks like: With fdclsFrm.colClasses .item("cboIDCity").NotInListData "tlkpCity", "CI_City", "lfrmCity", True, False End With This is what programs the specific behavior that you refer to. The combo city is passed parameters - the lookup table for the list data, the field the data goes in for NotInList automatic storage, the lfrm to open for a dblClick in the combo, and two booleans that program whether to turn on NotInList and DblClick processing. If a combo is not passed these parameters using this method call, then it does nothing (does not handle) notInList or DblClick. In my framework I pop up a generic message "you are not authorized to edit this data". Although I haven't done so, it would be possible to "tell" the combo that the form should be used for NotInList and DblClick simply by testing for a value passed into the table / field parameters. If nothing passed in there, but a form is passed in AND the UseNotInList boolean is true, then assume that the form should open for NotInList processing. The bottom line is that the form scanning is difficult to program for this kind of stuff directly unless you do use the tag property and I have a personal distaste for using the tag so I don't. My good friend William started me moving away from using tags. He said "just give me a method to directly program behaviors and I'll do it explicitly". Now I do just that. John W. Colby www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Developer Sent: Wednesday, March 24, 2004 9:17 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Framework Discussion - set up question I;ve been not able to read all the mail on the FW closely for the past week, so sorry if this is a repeat. I "get" the idea, and the form scanning, but I don't see exaclty where to tell the fw that , for example, on 2 different combo's Not In List, I want combo1 to pop a form for data-entry, but combo2 to silently undo and reject the newdata. Should this be set in the Tag property? Tia, Steve -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com