Table of contents
TOC
折叠目录
展开目录

DoCmd.RepaintObject 方法 (访问)DoCmd.RepaintObject Method (Access)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

RepaintObject方法执行 Visual Basic 中的 RepaintObject 操作。The RepaintObject method carries out the RepaintObject action in Visual Basic.

语法Syntax

表达式RepaintObject(* 对象类型对象名称)expression. **RepaintObject( ** ObjectType, ** ObjectName* )

表达式_一个表示DoCmd对象的变量。_expression A variable that represents a DoCmd object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
对象类型ObjectType可选OptionalAcObjectTypeAcObjectType一个AcObjectType常量,指定要绘制的对象的类型。A AcObjectType constant that specifies the type of object to repaint.
对象名称ObjectName可选OptionalVariantVariant字符串表达式,由_对象类型_参数所选类型对象的有效名称。A string expression that's the valid name of an object of the type selected by the objecttype argument.

注解Remarks

可以使用RepaintObject方法来完成所有未完成的屏幕更新指定的数据库对象或者活动的数据库对象,如果未指定。此类更新包括任何挂起的重新计算对象的控件。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.

使用不带任何参数 (默认常量, acDefault,则假定为_对象类型_参数) 的RepaintObject方法重新绘制活动窗口。Using the RepaintObject method with no arguments (the default constant, acDefault, is assumed for the objecttype argument) repaints the active window.

DoCmd对象的RepaintObject方法添加为在 Microsoft Access 95 中的 Visual Basic 代码中运行的RepaintObject方法提供向后兼容性。如果您想要重新绘制窗体时,建议您改为使用现有重画窗体对象的方法。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

下面的示例将重画 Customers 表:The following example repaints the table Customers:

DoCmd.RepaintObject acTable, "Customers"

另请参阅See also

概念Concepts

DoCmd 对象DoCmd Object

© 2018 Microsoft