home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / dbsales.zip / DBSALES.LBR / GAFIND.PRO < prev    next >
Text File  |  1986-01-14  |  1KB  |  55 lines

  1. *
  2. * GAFIND.PRO from GAMAIN.PRO
  3. * Quick find by key
  4. *
  5. SET CONSOLE OFF
  6. STORE 'KEY' to gasetting
  7. STORE 'SET INDEX TO ' TO gaset
  8. STORE 'SET FORMAT TO 'to gaform
  9. STORE 'PROSPECTS' TO gapro
  10. SET CONSOLE ON
  11. &gaform&gasysb&gapro
  12. DO WHILE .T.
  13. CLEAR
  14. TEXT
  15.           Quick find by indexed field
  16.  
  17.                 1. Find by KEY (default)
  18.  
  19.                 2. Find by COMPANY
  20.  
  21.                 3. Find by NAME
  22.  
  23.                 RETURN exits
  24.          Upper/lower case counts when searching.
  25.          
  26.  
  27. ENDTEXT
  28. @ 11,9 SAY 'CURRENT SETTING IS &gasetting'
  29. ACCEPT '# and <enter> or string to search for and <enter>...' to;
  30.  GAFIND           
  31.  DO CASE GAFIND
  32.     CASE GAFIND = '1'
  33.         STORE 'KEY' TO gasetting
  34.         &gaset&gasysb&gasetting        
  35.     CASE GAFIND = '2'
  36.          STORE 'COMPANY' TO gasetting
  37.          &gaset&gasysb&gasetting
  38.     CASE GAFIND = '3'
  39.         STORE 'NAME' TO gasetting
  40.         &gaset&gasysb&gasetting
  41.     OTHERWISE
  42.         IF GAFIND < "!"
  43.       &gaset&gasysb&gakey&gasysb&gacompany&gasysb&ganame
  44.            RETURN
  45.         ENDIF
  46.         FIND &GAFIND
  47.          IF .NOT. EOF()
  48.          EDIT            
  49.          ELSE
  50.          ? CHR(7)
  51.          WAIT
  52.          ENDIF
  53. ENDCASE
  54. ENDDO
  55.