Table of contents
TOC
Collapse the table of content
Expand the table of content

DoCmd.RepaintObject Method (Access)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

The RepaintObject method carries out the RepaintObject action in Visual Basic.

Syntax

expression. RepaintObject( ** ObjectType, ** ObjectName )

expression A variable that represents a DoCmd object.

Parameters

NameRequired/OptionalData TypeDescription
ObjectTypeOptionalAcObjectTypeA AcObjectType constant that specifies the type of object to repaint.
ObjectNameOptionalVariantA string expression that's the valid name of an object of the type selected by the objecttype argument.

Remarks

You can use the RepaintObject method to complete any pending screen updates for a specified database object or for the active database object, if none is specified. Such updates include any pending recalculations for the object's controls.

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 method 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.

Example

The following example repaints the table Customers:

DoCmd.RepaintObject acTable, "Customers"

See also

Concepts

DoCmd Object

© 2018 Microsoft