ERR: Not a Numeric ExpressionLast reviewed: November 28, 1995Article ID: Q120536 |
The information in this article applies to:
SYMPTOMSYou receive the error message "Not a numeric expression" after any of four types of @ ... GETs: buttons, radio buttons, popups, and list boxes.
CAUSEThe FoxPro for Windows "Developer's Guide" for versions 2.5x and 2.6x states on page B-26 that the error "Not a numeric expression" occurs when "An attempt was made to use the SUM command on a non-numeric field." Another cause for this error message is using a variable that has not been initialized after being declared in a button, radio button, popup, or list box.
RESOLUTIONIf a variable is declared, but not initialized, it contains the value of false (.F.). If you then use this variable as the variable for specific types of @ ... GET commands, you will see the "Not a numeric expression" error when you run the code. The solution is to initialize the variable to a number, or to not declare the variable at all.
MORE INFORMATION
Steps to Reproduce Behavior
WorkaroundThere are two ways to resolve this problem:
REFERENCES"Language Reference," version 2.5 (MS-DOS, Windows), pages L3-31 to L3-126
|
Additional reference words: FoxDos FoxWin VFoxWin 2.00 2.50 2.50a 2.50b
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |