Microsoft KB Archive/104795

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 15:03, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

ID: Q104795

2.50 WINDOWS

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: KBSubcategory: FxtoolSbuilder

Keywords          : kberrmsg FxtoolSbuilder 
Version           : 2.50
Platform          : WINDOWS
Solution Type     : kbfix

Last Reviewed: May 22, 1998
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.