ID: Q99615
2.50 2.50b MS-DOS kbprg kbfixlist kbbuglist kberrmsg
The information in this article applies to:
If an application is generated with FoxApp, when the application is executed, an "Invalid Subscript Reference" error is returned.
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.
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.
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
Last Reviewed: September 22, 1997