Form.BeforeRender 事件 (Access)
在指定数据透视图视图中的任意对象呈现之前,发生该事件。
语法
表达式。BeforeRender (drawObject、 chartObject、 Cancel)
expression:表示 Form 对象的变量。
参数
名称 | 必需/可选 | 数据类型 | 说明 |
---|---|---|---|
drawObject | 必需 | Object | 上绘制 对象的引用。 使用 DrawType 属性返回的对象来确定哪种类型的呈现即将发生。 |
chartObject | 必需 | Object | 要呈现的对象。 TypeName 函数用于确定对象的类型。 |
Cancel | 必需 | Object | 将此对象的 Value 属性设置为 True 可取消数据透视图对象的呈现。 |
返回值
无
示例
下面的示例演示如何捕获 BeforeRender 事件的子程序的语法。
Private Sub Form_BeforeRender( _
ByVal drawObject As Object, _
ByVal chartObject As Object, _
ByVal Cancel As Object)
Dim intResponse As Integer
Dim strPrompt As String
strPrompt = "Cancel render of current object?"
intResponse = MsgBox(strPrompt, vbYesNo)
If intResponse = vbYes Then
Cancel.Value = True
Else
Cancel.Value = False
End If
End Sub
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。