Multiple BROWSE Example for FoxPro Versions 1.01, 1.02Last reviewed: April 17, 1995Article ID: Q88417 |
The information in this article applies to:
Below is an example of how to do multiple BROWSEs in FoxPro versions 1.01 and 1.02. (To do the same thing in FoxPro version 2.0, use the READ VALID command instead.)
*:******************************************************************* *: *: Program: MULTIBRO.PRG *: *: System: Multiple Browses *: Copyright (c) 1991, Fox Software *: Last modified: 03/08/91 11:02 *: *: Procs & Fncts: GETOUT *: *: Calls: GETOUT (procedure in MULTIBRO.PRG) *: *: Uses: FOX1.DBF *: : FOX2.DBF *: : FOX3.DBF *: *: Documented 03/08/91 at 11:15 FoxDoc version 2.01 *:******************************************************************** *This program will requires 3 databases: fox1, fox2 and fox3. ON ERROR DO errhand WITH ERROR(),MESSAGE() CLEAR USE fox1 USE fox2 IN B USE fox3 IN C ON KEY LABEL f3 DO getout DEFINE WINDOW stop FROM 1,1 TO 2,2 COLOR ,,B/B DEFINE WINDOW b1 FROM 3,3 TO 8,70 SYSTEM COLOR SCHEME 10 DEFINE WINDOW b2 FROM 9,3 TO 15,70 SYSTEM COLOR SCHEME 10 DEFINE WINDOW b3 FROM 16,3 TO 24,70 SYSTEM COLOR SCHEME 10 BROWSE TITLE "CHOOSE 1" WINDOW b1 NOWAIT NOCLEAR SAVE SELE B BROWSE TITLE "CHOOSE 2" WINDOW b2 NOWAIT NOCLEAR SAVE SELE C BROWSE TITLE "CHOOSE 3" WINDOW b3 NOWAIT NOCLEAR SAVE DO WHILE WONTOP()<>"STOP" DO CASE CASE WONTOP()="CHOOSE 1" SELE A BROWSE TITLE "CHOOSE 1" WINDOW b1 NOCLEAR SAVE CASE WONTOP()="CHOOSE 2" SELE B BROWSE TITLE "CHOOSE 2" WINDOW b2 NOCLEAR SAVE CASE WONTOP()="CHOOSE 3" SELE C BROWSE TITLE "CHOOSE 3" WINDOW b3 NOCLEAR SAVE ENDCASE ENDDO ON KEY CLOSE ALL CLEAR ALL CLEAR windows CLEAR *!******************************************************************** *! *! Procedure: GETOUT *! *! Called by: MULTIBRO.PRG *! *!******************************************************************** PROCEDURE getout ACTIVATE WINDOW stop *: EOF: MULTIBRO.PRG PROCEDURE errhand PARAMETERS error, message IF error = 109 WAIT "On error proc" WINDOW RETRY ELSE WAIT STR(error) + " In ELSE of on error" WINDOW ENDIF |
Additional reference words: FoxDos 1.01 1.02
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |