

The Alt key is chosen as the modifier key because I was unable to get the Cntrl and ' key combination suitably recognised by the AOO APIģ.ğurther fields may be copied from the same row by selecting another field and pressing the Alt and ' combination to repeat the macro.Ĥ.Ĝare is required as in Base any change of the record pointer will automatically flush the output buffer to a saved record in the database: for this reason a cloned resultset is used in the macros for certain actions.ĥ. The macro presupposes a Table/Grid form control is used being the most likely format for the cloning and display of several records.Ģ.ěoth macros are triggered by the Key Released event in the Table/Grid form control. I would welcome criticisms or comments, but even more discovery of errors.ġ. The macro is offered as is, without proper testing or serious elimination of the inevitable bugs.

The macro permits either pressing the Alt and ' key combination to copy to any selected field (new or existing) the data from the corresponding field in its immediate predecessor, or pressing the Alt and + (num pad) combination to clone any selected record to the new record row. In the attached demo that macro has been extended to permit either cloning a whole record or copying a single field from its previous record as found in MS Access. A macro has permitted data from any selected record to be cloned to the new record entry buffer where changes may be made before a final save to the database.


From time to time there have been requests to match the MS Access facility whereby pressing a key combination automatically copies to a new record the data recorded for that particular field in the previous record.Ī macro is clearly required but, due to the idiosyncrasies of the OpenOffice API, portability encourages coding that eschews references to a named or any object that may be specific to a particular application.įor several years I have used Base for a book-keeping application where often new transactions differ in only minor respects from previous records.
