Monday, 18 April 2011
Add Saved Objects to Collections
To display a previously saved object in an object collection, use Me.Populate(<obj_id(s)>) from within the object's Collection Code.
Tuesday, 5 April 2011
Code vs Collection Code
Applies to Objects and ReportObjects:
- 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.
Subscribe to:
Posts (Atom)