This section lists the macros currently available.
Cancel BoxThis displays a popup box with two options, Continue and Cancel. If the user selects the latter then macro execution is terminated. The macro has two arguments, a message for the popup box, and an optional caption for the box.
Message BoxThis displays a popup box containing a message; macro execution continues when the user clicks the OK button. The macro has two arguments, a message for the popup box, and an optional caption for the box.
Prompt BoxThis displays a popup box containing a message, and prompts for the user to enter a value. If the user clicks Cancel then macro execution is terminated, otherwise the entered value is stored. It can be subsequently used by the Set Field macro when updating a control in a form.
Debug EnableThis macro enables or disables macro debugging when the main debug option is set to On Demand. See the section above on macro debugging for details.
Open FormThis macro will open a named form, either in data view or in design view; the two arguments specify the form name and the required view. If the form is opened successfully, then Rekall notes which form has been opened for use in following macro instructions such as Navigate and Close Form.
Note that the form is remembered on a per-macro basis, so if you have more than one macro executing (for instance, the first macro opens a modal form, which then executes a second macro), then opening a form in one macro does not affect any other macro.
NavigateThe navigate macro can be used to manipulate an open form in much the same way as the user can, for instance by using the tool bar. The macro takes two arguments, which specify the form and the navigation operation.
The first argument should be the name of an open form, except that if it is left blank then the form most recently opened (within this macro) by the Open Macro instruction will be used. The second argument is the navigation operation:
Operation | |
First | Move to first record in form |
Previous | Move to previous record in form |
Next | Move to next record in form |
Last | Move to last record in form |
Add | Create a new empty record |
Save | Save changes in current record |
Delete | Delete current record |
Query | Start query execution |
Execute | Execute query |
Cancel | Cancel query execution |
This macro closes the named form. Note that although this macro does take note of the most recently opened form, this is not very useful (either the form was modal, in which case control would not return to the macro until the form was closed, or if not modal then the form would simply be opened and then closed).
If the form name is set to [Invoker] and the macro was called from a form, then that form will be closed. Hence, you can create a macro that performs some actions and then closes the form.
Open ReportOpens the named report. Control will return immediately, unless the report is modal, in which case execution is paused until the user closes the report.
Get FieldThis macro specifies a form and a control within the form. The current value in the field is retrieved and is saved for future use by the Set Field macro. The form name is either the name of an open form or [Invoker] to mean the form which invoked the macro; the field name is the path name to the control starting at the top level of the form (so, for a control called Name in the outer block, it would be Name; if Name was embedded in a subform called Details then the path would be Details/Name).
Set FieldThis macro specifies a form and a control within the form. The current value in the field is set to the value previously stored by a Prompt Box or Get Field macro. The form name and field name are as for Get Field.
Open TableOpens the named table. Control will return immediately.
Open QueryOpens the named query. Control will return immediately.