Microsoft KB Archive/96358

{| = Using Multiple Screens for Data Entry with One READ =
 * width="100%"|

ID: Q96358

2.50 2.50a | 2.00 2.50 2.50a

WINDOWS   | MS-DOS 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.