ODE97: DOC: Code Example in NodeClick Event Help Topic IncorrectLast reviewed: October 20, 1997Article ID: Q172167 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you paste the sample code from the NodeClick event into a form's class module and then compile it, you may receive the following error message:
Compile error: Event procedure declaration does not match description of event having the same name.This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to the "Building Applications with Microsoft Access 97" manual.
CAUSEThe code example contains the following procedure:
Private Sub TreeView1_NodeClick(ByVal Node As Node) Form1.Caption = "Index = " & Node.Index & " Text:" & Node.Text End SubThe data type of the argument that is passed to this procedure should be Object instead of Node. The subroutine also sets the Caption property of the undefined variable Form1.
RESOLUTIONEdit the TreeView1_NodeClick procedure so that it reads as follows:
Private Sub TreeView1_NodeClick(ByVal Node As Object) Me.Caption = "Index = " & Node.Index & " Text:" & Node.Text End Sub MORE INFORMATION
Steps to Reproduce Behavior
Keywords : kberrmsg kbprg Version : 97 Platform : WINDOWS Hardware : x86 Issue type : kbdocerr Solution Type : kbworkaround |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |