You can use the RepaintObject action to complete any pending screen updates for a specified database object or the active database object, if none is specified. Such updates include any pending recalculations for the object’s controls.
The RepaintObject action uses the following arguments.
Action argument |
Description |
Object Type |
The type of object to repaint. Click Table, Query, Form, Report, Macro, or Module from the Object Type box in the Action Arguments section of the Macro window. Leave this argument blank to select the active object. |
Object Name |
The name of the object to repaint. The Object Name box shows all objects in the database of the type selected by the Object Type argument. If you leave the Object Type argument blank, leave this argument blank also. |
Microsoft Access waits to complete pending screen updates until it finishes other pending tasks. With this action, you can force immediate repainting of the controls in the specified object. You can use this action:
This action doesn’t cause a requery of the database, so it doesn’t show new and changed records, or remove deleted records from the object’s underlying table or query. Use the Requery action to requery the source of the object or one of its controls. Use the ShowAllRecords action to display the most recent records and remove any applied filters.
Note The RepaintObject action doesn’t have the same effect as choosing the Refresh command from the Records menu, which shows any changes you or other users have made to the currently displayed records in forms and datasheets.
To run the RepaintObject action in Visual Basic, use the RepaintObject method of the DoCmd object.
RepaintObject Method, Requery Action, SetValue Action, ShowAllRecords Action.