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 uses the following arguments.

Argument

Description

objecttype

One of the following intrinsic constants:


acTable

objectname

A string expression that is the valid name of an object of the type selected with the objecttype argument.


Remarks

Using the RepaintObject method with no arguments 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 for Windows 95. If you want to repaint a form, it is 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, Requery Method (DoCmd Object), ShowAllRecords Method.

Example

This example repaints the form Customers.


DoCmd.RepaintObject acForm, "Customers"