PRB: Wrong Form Name Returned in Opentables Event (129227)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q129227 SYMPTOMS
When 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.
CAUSE
The 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).
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/12/2000 |
---|
Keywords: | KB129227 kbAudDeveloper |
---|
|