RepaintObject Method

Applies To   DoCmd object.

Description

The RepaintObject method carries out the RepaintObject action in Visual Basic. For more information on how the action and its arguments work, see the action topic.

Syntax

DoCmd.RepaintObject [objecttype, objectname]

The RepaintObject method has the following arguments.

Argument

Description

objecttype

One of the following intrinsic constants:

acDefault (default)
acForm
acMacro
acModule
acQuery
acReport
acTable

objectname

A string expression that's the valid name of an object of the type selected by the objecttype argument.


Remarks   Using the RepaintObject method with no arguments (the default constant, acDefault, is assumed for the objecttype argument) repaints the active window.

The RepaintObject method of the DoCmd object was added to provide backwards compatibility for running the RepaintObject action in Visual Basic code in Microsoft Access 95. If you want to repaint a form, it's recommended that you use the existing Repaint method of the Form object instead.

See Also   DoCmd object, Recalc method, Refresh method, Repaint method, RepaintObject action, Requery method (Control or Form object), Requery method (DoCmd object), ShowAllRecords method.

Example

The following example repaints the table Customers:

DoCmd.RepaintObject acTable, "Customers"