Microsoft KB Archive/90415

= Suppressing the &quot;Invalid Input&quot; Error Message in FoxPro =

Article ID: 90415

Article Last Modified on 12/3/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft FoxPro 2.0
 * Microsoft FoxPro 2.5b for MS-DOS
 * Microsoft FoxPro 2.5a
 * Microsoft FoxPro 2.5b
 * Microsoft FoxPro 2.5a
 * Microsoft FoxPro 2.5b for Macintosh

-



This article was previously published under Q90415



SUMMARY
When Microsoft FoxPro evaluates a user-defined function (UDF) that returns the Boolean value .F., FoxPro displays the message &quot;Invalid Input (press space)&quot; and halts execution until you press the SPACEBAR. To suppress this error message, return the value 0 when the condition is not met.

The code example below accepts input for a screen variable called &quot;mystate&quot;. The code calls a UDF to evaluate mystate, and displays a customized error message when the state is not equal to &quot;WA&quot;. mystate=SPACE(2) @ 2,2 GET mystate VALID checkit READ PROCEDURE checkit IF UPPER(mystate)<>&quot;WA&quot; WAIT WINDOW &quot;MYSTATE must be equal to WA&quot; NOWAIT RETURN 0 ENDIF RETURN

Additional query words: VFoxWin FoxMac FoxDos FoxWin prompt

Keywords: KB90415

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.