Common macro actions that Access uses for macro control programs

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.