home *** CD-ROM | disk | FTP | other *** search
/ Software Du Jour / SoftwareDuJour.iso / BUSINESS / DBASE / VIEWGEN.ARC / SAM_LABE.PRG < prev    next >
Encoding:
Text File  |  1985-11-05  |  1.2 KB  |  54 lines

  1. * Program.: SAM_LABE.PRG
  2. * Author..: Your Name
  3. * Date....: 11/05/85
  4. * Notice..: Copyright 1985, Your Company, All Rights Reserved
  5. * Version.: dBASE III, version 1.1
  6. * Notes...: LABELS program for NAMES.DBF
  7. *
  8. CLEAR
  9. SET COLOR TO &WindowAtr
  10. @  2, 0 SAY "P R I N T    L A B E L S"
  11. @  2,72 SAY DATE()
  12. @  3, 0 SAY PromptBar
  13. * ---If the file does not exist, create it.
  14. IF .NOT. FILE( "NAMES.LBL" )
  15.    choice = " "
  16.    @  5, 0 SAY "The NAMES label form does not exist.  CREATE IT? (y/n)";
  17.            GET choice PICTURE "!"
  18.    READ
  19.    IF choice <> "Y"
  20.       RETURN
  21.    ENDIF
  22.    CREATE LABEL NAMES
  23.    RETURN
  24. ENDIF
  25. * ---Get the FILTER <exp> for the labels.
  26. @ 5,0 CLEAR
  27. DO GetExpr WITH 18,"Print LABELS FOR ",expr
  28. SET FILTER TO &expr
  29. @ 5,0 CLEAR
  30. choice = " "
  31. @  5, 0 SAY "Output to the screen or printer? [S/P]";
  32.         GET choice PICTURE "!"
  33. READ
  34. DO CASE
  35. CASE choice = " "
  36.    RETURN
  37. CASE choice = "P"
  38.    @ 5,0 CLEAR
  39.    @  5, 0 SAY "Printing labels..."
  40.    SET ESCAPE ON
  41.    LABEL FORM NAMES TO PRINT
  42.    SET ESCAPE OFF
  43. OTHERWISE
  44.    CLEAR
  45.    SET ESCAPE ON
  46.    LABEL FORM NAMES
  47.    SET ESCAPE OFF
  48.    WAIT
  49. ENDCASE
  50. SET FILTER TO
  51. GOTO oldrecnum
  52. RETURN
  53. * EOF: SAM_LABE.PRG
  54.