Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What you are looking at in the Developers Guide is the manipulation of a data set (think Query) using macros. The cursor referred to here is the field/record currently pointed to within the record set - very similar to the position of the mouse cursor within a table control or control field.

Although not quite clear, it appears your form has two table controls. For sake of argument, Form contains the Master table and the sub-Form contains a table related to the Master. When you select a Master record, the related records appear in the sub-form control. The updating of tables are independent of each other. If in the sub-table you enter data in a new row and BEFORE advancing to another new row you select a different row in the Master table, the sub-table will not be updated. However, once you advance to a new row in the sub-table control, that record is updated.

Depending upon what you are trying to validate in each field, most can be accomplished through settings within the properties for each column in the table control. If this is not enough (hardly ever the case) and you actually need to control the checking through macros, the task is not easy. Using an event such as 'Before record change' actually occurs even when loading records into the table (ie: starting the form, or changing Master record selection'). Instead, you might need to look at individual fields by triggering an event such as 'When receiving focus' or 'When losing focus'.

Using a 'Save' button is not very different. You would typically set the sub-form with individual fields (as opposed to a table control) and set the 'Execute action' event of the button to run your code for validation and update.

Again it is hard to tell what validation you want that can't be handled without code.