Microsoft KB Archive/104795: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 1: Line 1:
{|
{|
|width="100%"|
|width="100%"|
= FIX: GENSCRN: "Variable Not Found" Message with Array Popup =
= FIX: GENSCRN: "Variable Not Found" Message with Array Popup =


'''ID: Q104795'''
'''ID: Q104795'''
Line 13: Line 13:
== SYMPTOMS ==
== 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.
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 ==
== STATUS ==
Line 30: Line 30:


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


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


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


Line 45: Line 45:
     select Expression.
     select Expression.


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


  8. Type "2" (without the quotation marks) in the text box, then press
  8. Type "2" (without the quotation marks) in the text box, then press
     ENTER. (The insertion point should be directly below the 2.)
     ENTER. (The insertion point should be directly below the 2.)
     Choose OK and return to the main screen.
     Choose OK and return to the main screen.
Line 60: Line 60:
</pre>
</pre>
10. Run TEST.SPR.
10. Run TEST.SPR.
You will receive a &quot;Variable not found&quot; Program Error message box. Choose Cancel in the message box.
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.
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.

Latest revision as of 09:59, 20 July 2020

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.