ID: Q121344
The information in this article applies to:
The error message "Variable 'myvar' not found" occurs in the VALID code snippet when the variable was initialized in the WHEN code snippet.
To solve this problem, do one of the following:
PUBLIC myvar
-or-
1. Open CUSTOMER.DBF by issuing the following command in the Command
window:
USE <FoxPro_directory>\tutorial\customer.dbf
2. Create a quick screen.
3. Edit the WHEN code snippet of the CONTACT field. Select Procedure and
enter the following commands:
m.myvar = customer.contact
WAIT WINDOW customer.contact
WAIT WINDOW m.myvar
4. Edit the VALID code snippet of the CONTACT field. Select Procedure and
enter the following command:
WAIT WINDOW customer.contact
WAIT WINDOW m.myvar
5. Save and generate the screen. Run the screen by issuing the following
command in the Command window:
DO test9.spr
6. Click the CONTACT field. Two WAIT windows appear with a name in each;
press ENTER once for each window that appears. Press ENTER again to
leave the field. One WAIT window will appear with a name, and then the
error message will appear.
Additional reference words: FoxDos FoxWin 2.50 2.50a 2.50b 2.60 memvar
KBCategory: kbprg kberrmsg kbprb
KBSubcategory: FxsetupError
Last Reviewed: August 28, 1995