Macros are very rich, and if you just do a small database, the process of the program can be fully implemented with macros, without using Visual Basic.
Some operations have no parameters (such as Beep), while others must specify parameters (such as OpenForm). In general, it is a good practice to set the parameters of an operation in the order of the parameters, because selecting a parameter determines the selection of the parameters that follow the parameter.
Common macro Operations
Operation |
Description |
Beep |
Beep through the computer's speakers. |
Close |
Closes the specified Microsoft Access window. Closes the active window if no window is specified. |
GoToControl |
Move the focus to a specific field or control on the current record in the open form, form datasheet, table datasheet, query datasheet. |
Maximize |
Enlarges the active window so that it fills the Microsoft Access window. This action allows the user to see as many objects in the active window as possible. |
Minimize |
Shrinks the active window to a small title bar at the bottom of the Microsoft Access window. |
MsgBox |
Displays a message box that contains a warning message or other information. |
OpenForm |
Open a form and limit the records that the form displays by selecting the form's Data entry and window mode. |
OpenReport |
Open the report in Design view or print preview or print the report now. You can also limit the records that need to be printed in the report. |
PrintOut |
Print active objects in the open database, or you can print data tables, reports, forms, and modules. |
Quit |
Quit Microsoft Access. The Quit operation can also specify whether to save database objects before exiting Access. |
RepaintObject |
Completes the screen update of the specified database object. If a database object is not specified, the active database object is updated. Updates all recalculation of all controls that include the object. |
Restore |
Restores a window that is maximized or minimized to its original size. |
RunMacro |
Run the macro. The macro can be in a macro group. |
SetValue |
Sets the value of a field, control, or property on a Microsoft Access form, form datasheet, or report. |
StopMacro |
Stop the macro that is currently running. |