PRB: Wrong Form Name Returned in Opentables EventLast reviewed: April 30, 1996Article ID: Q129227 |
The information in this article applies to:
SYMPTOMSWhen using the PROGRAM() function to verify the method of a form that is being executed, you notice that the name of the form is incorrect in the Opentables Event and BeforeOpenTables event of the Data Environment. The PROGRAM() function returns FORM.DATAENVIRONMENT.OPENTABLES when it is called from the OpenTables and FORM.DATAENVIRONMEMT.BEFOREOPENTABLES when it is called from the BeforeOpenTables. If the name of the form is FORM1, the PROGRAM() function should return FORM1.DATAENVIRONMENT.OPENTABLES and FORM1.DATAENVIRONMENT.BEFOREOPENTABLES.
CAUSEThe OpenTables and BeforeOpenTables events are executed before the properties of the Form object are set. The PROGRAM() function uses the Name property of the object. Because the Name property of the form has not been set yet, the PROGRAM function uses the default name (Form).
STATUSThis behavior is by design.
MORE INFORMATIONThe PROGRAM() function returns the name of the currently executing program. It can also return the name of the method that is currently executing. You can use the PROGRAM() function as a debugging tool in the Debug window.
Steps to Reproduce Behavior
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |