FIX: FoxApp Error Message: Invalid Subscript Reference

Last reviewed: September 22, 1997
Article ID: Q99615
2.50 2.50b MS-DOS kbprg kbfixlist kbbuglist kberrmsg

The information in this article applies to:

  • Microsoft FoxPro for MS-DOS, versions 2.5, 2.5b

SYMPTOMS

If an application is generated with FoxApp, when the application is executed, an "Invalid Subscript Reference" error is returned.

WORKAROUND

To work around this problem, do the following:

  1. From the File menu, choose Open, and open the FOXAPP.PJX file, which is located in the FOXPRO25\FOXAPP subdirectory.

  2. From the File menu, choose Open, and open the PRTOPTS.SCX file, which is located in the FOXPRO25\FOXAPP\SCREENS subdirectory.

  3. From the Screen menu, choose Screen Layout.

  4. Under Screen Code, select Setup.

  5. In the PRTOPTS Setup window, add an asterisk(*) to the beginning of the following line:

          SELECT ((juststem(dbfname)))
    

  6. Add the following two lines to the beginning of the Setup code:

          xxxzzz=juststem(dbfname)
          SELECT (xxxzzz)
    

  7. Close the PRTOPTS Setup window.

  8. From the File menu, choose Save.

  9. Rebuild FOXAPP.APP and make sure it is placed in the FOXPRO25 directory.

The next time an .APP file is built using FoxApp, the error "Invalid subscript reference" will not occur.

STATUS

Microsoft has confirmed this to be a problem in FoxPro version 2.5. This problem was corrected in FoxPro version 2.5a, but it reoccurred in FoxPro version 2.5b. It was corrected again in version 2.6.

MORE INFORMATION

Steps to Reproduce Problem

  1. Generate an application with FoxApp. For more information on how to generate applications with FoxApp, see Chapter 16, "Building Applications with FoxApp," in the version 2.5 "Developer's Guide."

  2. Use the DO command to execute the application.

  3. From the Application menu, choose Report.

  4. Select the Report dialog box. This works as expected.

  5. From the System menu, choose Quit to exit the application.

  6. From the File menu, choose Quit to exit FoxPro for MS-DOS.

  7. Restart FoxPro for MS-DOS.

  8. Use the DO command to execute the application again.

  9. From the Application menu, choose Report.

The following error is displayed:

   line no:     60
   program:     prtopts
   error:       invalid subscript reference
   source:      SELECT ((juststem(dbfname)))


Additional reference words: FoxDos 2.50 2.50b buglist2.50 buglist2.50b
fixlist2.50a fixlist2.60 err msg errmsg
KBCategory: kbprg kbfixlist kbbuglist kberrmsg
KBSubcategory:
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: September 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.