home *** CD-ROM | disk | FTP | other *** search
- * Maillbls.prg generates labels for brochures and customer
- * mailings
-
-
- * Select database Customer with index Ziplist
- SELECT Customer
- SET INDEX TO Ziplist, Lastname, Custno
-
- * Display menu
- CLEAR
- @ 3,0 SAY CENTER("MAILING LABEL GENERATOR")
- @ 8,5 SAY "Select what labels are to be used for:"
- @ 10,10 SAY "A. Brochures to new customers"
- @ 12,10 SAY "B. Mailing to all customers"
- @ 14,10 SAY "Q. Quit and return to main menu"
-
- * Get the user's selection
- STORE " " TO select
- @ 16,5 SAY "Enter selection: ";
- GET select PICTURE "!"
- READ
-
- * Quit if requested, otherwise prepare to print labels
- IF select = "Q"
- RETURN
- ELSE
-
- * Pause until user is ready
- WAIT " Prepare printer. Hit any key to begin "+;
- "printing labels."
-
- * Print sample label
- CLEAR
- @ 11,0 SAY "Printing a sample label"
-
- * Print labels as directed by user's selection
- IF select = "A"
-
- * Determine if there are any customers that
- * have not been sent brochures
- LOCATE FOR .NOT. Sent_bro
- IF FOUND()
- LABEL FORM Customer FOR .NOT. Sent_bro SAMPLE TO PRINT
- REPLACE ALL Sent_bro WITH .T. FOR .NOT. Sent_bro
- ELSE
-
- * Display message that no labels will print
- @ 10,0 SAY "All customers have been sent brochures"
- WAIT
- ENDIF
- ELSE
- LABEL FORM Customer SAMPLE TO PRINT
- ENDIF
- ENDIF
-
- * Return to Menu.prg
- RETURN