FIX: GENSCRN: "Variable Not Found" Message with Array Popup

Last reviewed: October 14, 1997
Article ID: Q104795
2.50 WINDOWS kbprg kbfixlist kbbuglist kberrmsg

The information in this article applies to:

  • Microsoft FoxPro for Windows, version 2.5

SYMPTOMS

When you are using a popup array in the Screen Builder, placing an extra carriage return in either the 1st Element or # Elements text boxes causes a "Variable not found" error message when the generated code is run.

STATUS

Microsoft has confirmed this to be a problem in FoxPro 2.5 for Windows. This problem was corrected in FoxPro 2.5a for Windows.

MORE INFORMATION

The 1st Element and # Element entries provide the values used by the RANGE clause in the GET statement generated for the popup. When an additional carriage return is entered in the text box after either of these entries, the generated code contains a semicolon on the line following the RANGE clause, instead of at the end of the line containing the RANGE clause. (The semicolon is the line-continuation character.)

Steps to Reproduce Problem

  1. Use the Screen Builder to create a new screen.

  2. Open the Setup code window and type the following code:

    DIMENSION PopArray(4) PopArray(1) = "1st element" PopArray(2) = "2nd element" PopArray(3) = "3rd element" PopArray(4) = "4th element"

  3. Create a popup field. In the Popup dialog box, under Options, choose Array popup.

  4. In the Array Popup text box, type "PopArray" (without the quotation marks). In the Variable text box, type "x" (without the quotation marks).

  5. Under Clauses, choose 1st Element. In the Code Snippet dialog box, select Expression.

  6. Type "2" (without the quotation marks) in the text box, then press ENTER. (The insertion point should be directly below the 2.) Choose OK.

  7. Under Clauses, choose # Elements. In the Code Snippet dialog box, select Expression.

  8. Type "2" (without the quotation marks) in the text box, then press ENTER. (The insertion point should be directly below the 2.) Choose OK and return to the main screen.

  9. Save the screen as TEST.SCX (assuming that you do not already have a file with the same name), and generate TEST.SPR.

  10. Run TEST.SPR.

You will receive a "Variable not found" Program Error message box. Choose Cancel in the message box.

The TEST.SPR file is automatically opened. Note that the RANGE clause does not end with a semicolon as it should in order to continue the GET command.


Additional reference words: FoxWin 2.50 buglist2.50 fixlist2.50a errmsg err
msg execute do pop up pop-up
KBCategory: kbprg kbfixlist kbbuglist kberrmsg
KBSubcategory: FxtoolSbuilder
Keywords : FxtoolSbuilder kbbuglist kberrmsg kbfixlist kbprg
Version : 2.50
Platform : WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.