Macro Actions and Their Descriptions
Action | Description |
---|---|
AddMenu | Adds a menu to a custom menu bar for a form or report. Each menu on the menu bar requires a separate AddMenu action. |
ApplyFilter | Applies a filter or query to a table, form, or report. |
Beep | Causes the computer to beep. |
CancelEvent | Cancels the event that caused the macro to run. |
Close | Closes the specified window or the active window if none is specified. |
CopyObject | Copies the specified database object to a different Microsoft Access database or to the same database with a new name. |
DeleteObject | Deletes the specified object or the object selected in the Database window if no object is specified. |
Echo | Hides or shows the results of a macro while it runs. |
FindNext | Finds the next record that meets the criteria specified with the most recent FindRecord action or Find dialog box. Use to move successively through records that meet the same criteria. |
FindRecord | Finds the first or next record that meets the specified criteria. Records can be found in the active form or datasheet. |
GoToControl | Selects the specified field on the active datasheet or form. |
GoToPage | Selects the first control on the specified page of the active form. |
GoToRecord | Makes the specified record the current record in a table, form, or query. Use to move to the first, last, next, or previous record. |
Hourglass | Changes the mouse pointer to an hourglass while the macro runs. |
Maximize | Maximizes the active window. |
Minimize | Minimizes the active window. |
MoveSize | Moves and/or changes the size of the active window. |
MsgBox | Displays a message box containing a warning or informational message. |
OpenForm | Opens a form in Form view, Design view, Print Preview, or Datasheet view. |
OpenModule | Opens the specified Visual Basic module in Design view. |
OpenQuery | Opens a query in Datasheet view, Design view, or Print Preview. |
OpenReport | Opens a report in Design view or Print Preview or prints the report immediately. |
OpenTable | Opens a table in Datasheet view, Design view, or Print Preview. |
OutputTo | Exports the specified database object to a Microsoft Excel file (.xls), rich-text file (.rtf), text file (.txt), or HTML file (.htm). |
PrintOut | Prints the active database object. You can print datasheets, reports, forms, and modules. |
Quit | Quits Microsoft Access. |
Rename | Renames the specified object. |
RepaintObject | Completes any pending screen updates or pending recalculations of controls on the specified object or on the active object if none is specified. |
Requery | Forces a requery of a specific control on the active database object. |
Restore | Restores a maximized or minimized window to its previous size. |
RunApp | Starts another program, such as Microsoft Excel or Word. |
RunCode | Runs a Visual Basic Function procedure. |
RunCommand | Runs a command from Microsoft Access's menusfor example, File » Save. |
RunMacro | Runs a macro. |
RunSQL | Runs the specified SQL statement for an action query. |
Save | Saves the specified object or the active object if none is specified. |
SelectObject | Selects a specified database object. You can then run an action that applies to that object. |
SendKeys | Sends keystrokes to Microsoft Access or another active application. These keystrokes are processed as if you had typed them yourself on the keyboard. |
SendObject | Sends the specified database objects as an attachment in an e-mail. |
SetMenuItem | Sets the state of menu items (enabled or disabled, checked or unchecked) on custom menus. Works only on custom menus created using menu bar macros. |
SetValue | Sets the value for a control, field, or property on a form or report. |
SetWarnings | Turns all system messages on or off. This has the same effect as clicking OK or Yes in each message box. |
ShowAllRecords | Removes any applied filter from the active table, query, or form. |
ShowToolbar | Shows or hides a built-in toolbar or a custom toolbar. |
StopAllMacros | Stops all currently running macros. |
StopMacro | Stops the currently running macro. Use to stop a macro when a certain condition is met. |
TransferDatabase | Imports or exports data to or from the current database from or to another database. |
TransferSpreadsheet | Imports data from a spreadsheet file into the current database or exports data from the current database into a spreadsheet file. |
TransferText | Imports data from a text file into the current database or exports data from the current database into a text file. |
by
updated