- Code interacts with each item (object) in the current dataset. Methods such as BeforeUpdate() and AfterPopulate() will run for each item. The collection that contains the object is accessed via Me.ParentCollection. Use this option for changing the behaviour of on-form controls, such as Attribute read only access and value validation.
- Collection Code runs against the whole dataset. Methods such as BeforeUpdate() and AfterPopulate() will run only once. Individual items in the collection can be access via Me.ActiveItems. Use this option when making comparisons over the whole dataset or when running finalising code after all data has been updated.
Events trigger at the item level before they trigger at the collection item. For example when saving to the database, AfterSave()will be called on the item, then on the item's collection.
No comments:
Post a Comment