• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Summary of Macro Actions

To close this chapter, Table 13.10 presents a complete list of the macro actions you can use.

Table 13.10. Macro Actions and Their Descriptions
AddMenuReplaces a built-in menu bar for a form or report with a custom menubar; replaces a built-in shortcut menu for a form, report, or form control with a custom shortcut menu.
ApplyFilterUses a filter, query, or SQL WHERE clause to restrict and/or sort the records in a form or report.
BeepBeeps the computer’s speakers.
CancelEventCancels the event that caused the macro to run.
CloseCloses the active window or a specified window.
CopyDatabaseFileMakes a copy of the current Access database file.
CopyObjectCopies a database object to another database or to the current database with a different name.
DeleteObjectDeletes a specified database object or the selected object in the database window.
EchoHides or shows the macro’s actions while it runs.
FindNextFinds the next record that meets the criteria used in the most recent FindRecord action or Find dialog box usage.
FindRecordFinds the first record in a table or form that meets the specified criteria.
GoToControlMoves the focus to the specified field or control on the current datasheet or form.
GoToPageMoves the focus to the first field or control on the specified page in the active form.
GoToRecordMakes the specified record the current record in a table, query result, or form.
HourglassChanges the mouse pointer from the normal icon to an hourglass icon; the pointer is restored when the macro stops.
MaximizeEnlarges the active window to fill the Access window.
MinimizeReduces the active window to a title bar at the bottom of the Access window.
MoveSizeMoves or resizes the active window.
MsgBoxDisplays a message to the user.
OpenDataAccessPageOpens a specified data access page.
OpenDiagramOpens a specified database diagram.
OpenFormOpens a specified form.
OpenFunctionOpens a specified function.
OpenModuleOpens a specified Visual Basic module at a specified procedure or function.
OpenQueryOpens a specified query.
OpenReportOpens a specified report.
OpenStoredProcedureOpens a specified stored procedure.
OpenTableOpens a specified table.
OpenViewOpens a specified view.
OutputToExports data from a database object to a file in another format, such as HTML, Excel, or text.
PrintOutPrints the active datasheet, form, report, data access page, or module.
QuitShuts down Access.
RenameRenames the specified database object.
RepaintObjectCompletes any pending screen updates or control recalculations for the specified database object.
RequeryUpdates data in the specified control in the active database object.
RestoreRestores a maximized or minimized window to its original location and size.
RunAppRuns the specified application.
RunCodeRuns the specified VBA function. (To run a procedure, create a function that calls the procedure and then use RunCode to run the function.)
RunCommandRuns the specified command in a built-in menu or toolbar.
RunMacroRuns the specified Access macro.
RunSQLRuns the specified SQL statement for an action or data definition query.
SaveSaves the specified database object.
SelectObjectSelects the specified database object.
SendKeysSends one or more keystrokes to Access or the active application.
SendObjectIncludes the specified database object in an email message.
SetMenuItemSets the state of menu items (such as checked or unchecked) on the custom or global menu bar for the active window.
SetValueSets the value of a field, control, or property on a form or report.
SetWarningsTurns system messages on or off.
ShowAllRecordsRemoves any applied filter from the active table, query, or form.
ShowToolbarDisplays or hides a built-in or custom toolbar.
StopAllMacrosStops all currently running macros.
StopMacroStops the currently running macro.
TransferDatabaseImports, exports, or links data between the current Access database and another database.
TransferSpreadsheetImports, exports, or links data between the current Access database and a spreadsheet file.
TransferSQLDatabaseTransfers an SQL database from one server to a SQL database on another server.
TransferTextImports, exports, or links data between the current Access database and a text file.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint