Using Multiple Screens for Data Entry with One READ

Last reviewed: April 29, 1996
Article ID: Q96358
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a

SUMMARY

To use multiple screens for data entry with one READ command, you can use the memory variable _CUROBJ and the function OBJNUM(fieldname) to switch from one screen to the next.

Because FoxPro doesn't support having screens with scroll bars, this multiple-screen input technique is useful where complete data entry cannot be accomplished with one screen.

The instructions for this screen input technique are given below.

MORE INFORMATION

  1. Create a database with three fields named ONE, TWO, and THREE.

  2. Create one screen for each field in the Screen Builder and title the screens PAGE1, PAGE2, and PAGE3.

  3. On each screen, create a push button with a VALID clause. The push button should have at least two choices that allow for the selection of the other screens. For example, the selection names on PAGE1 would be PAGE2 and PAGE3.

  4. The CASE statement in the VALID clause for the push button selections should contain the following code:

          DO CASE
    
            CASE variable=1         && Variable is the name
               _CUROBJ= OBJNUM(two) && assigned to the push button.
            CASE variable=2
               _CUROBJ= OBJNUM(three)
          ENDCASE
    
    

  5. Combine the three screens into one screen set using the Project Manager. Build the application.

  6. Execute the application. When you choose the PAGE2 push button, the second screen will be shown.

REFERENCES

"Language Reference," version 2.5, pages L3-692 to L3-696, L4-11

"Commands & Functions," version 2.0, pages C3-545 to C3-549, C4-92


Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a scrolling read
level
KBCategory: kbprg kbcode
KBSubcategory: FxtoolSbuilder


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: April 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.