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

Form.BeforeRender Event (Access)

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

Occurs before any object in the specified PivotChart view has been rendered.


expression. BeforeRender( ** drawObject, ** chartObject, ** Cancel** )

expression A variable that represents a Form object.


NameRequired/OptionalData TypeDescription
drawObjectRequiredObjectA reference to the ChChartDraw object. Use the DrawType property of the returned object to determine what type of rendering is about to occur.
chartObjectRequiredObjectThe object that is to be rendered. Use the TypeName function to determine the type of the object.
CancelRequiredObjectSet the Value property of this object to True to cancel the rendering of the PivotChart View object.

Return Value



The following example demonstrates the syntax for a subroutine that traps the BeforeRender event.

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 
 Cancel.Value = False 
 End If 
End Sub

See also


Form Object

© 2018 Microsoft