home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Du Jour
/
SoftwareDuJour.iso
/
BUSINESS
/
DBASE
/
MEMBERS.ARC
/
MDLABEL.PRG
< prev
next >
Wrap
Text File
|
1986-10-18
|
3KB
|
112 lines
*----------------------------------------------------------------------
* Program : Membership Database Package
* File : MDLABEL
* Function: Display/Print mailing labels with optional query.
* Author : J. North
* Version : (AT contest)
* Date : 10/15/86
*----------------------------------------------------------------------
*
call curson
clear
@ 1, 0 to 9, 79 DOUBLE
@ 2, 2 say "LABEL PRINT SETUP Press Ctrl-End to return to menu."
@ 4, 30 say "Label Order Query File .QRY"
@ 5, 29 say "- - - - - - - - - - -"
@ 6, 30 say "0- Record # Order Label Form .LBL"
@ 7, 30 say "1- Last/First Name"
@ 8, 30 say "2- Zip Code Output Device:"
@ 3, 1 to 3, 78 DOUBLE
@ 4, 28 to 8, 28 DOUBLE
@ 4, 50 to 8, 50
@ 5, 51 to 5, 78
@ 7, 51 to 7, 78
do set_brt
@ 4, 2 say "F2 - Set Label Order"
@ 5, 2 say "F3 - Select Query File"
@ 6, 2 say "F4 - Change Output Device"
@ 7, 2 say "F5 - Select Label Form"
@ 8, 2 say "F6 - Print Labels"
do set_dim
q_ord=1
q_qry=space(8)
q_frm="ONE-UP "
do while .T.
@ 4, 43 get q_ord picture "9"
@ 4, 64 get q_qry picture "!!!!!!!!"
@ 6, 64 get q_frm picture "!!!!!!!!"
do show_dev
clear gets
set console off
key=0
do while key=0
key=inkey()
enddo
set console on
do case
case key=23
use
call cursoff
return
case key=-1
@ 4, 43 get q_ord picture "9" range 0,2
read
case key=-2
@ 10, 0 say ""
dir *.qry
@ 4, 64 get q_qry picture "!!!!!!!!"
read
@ 10, 0 clear to 24,79
if q_qry#space(8).and. .not. file(trim(q_qry)+".qry")
q_qry=space(8)
endif
case key=-3
m_device=iif(m_device=1,0,1)
case key=-4
@ 10, 0 say ""
dir *.lbl
@ 6, 64 get q_frm picture "!!!!!!!!"
read
@ 10, 0 clear to 24,79
if q_frm#"ONE-UP ".and. .not. file(trim(q_frm)+".lbl")
q_frm="ONE-UP "
endif
case key=-5
exit
endcase
enddo
do clwait
do dialog with 10,"Scanning records..."
select 1
use members index name,zip
set order to q_ord
if q_qry#space(8)
q_qry=trim(q_qry)+".qry"
set filter to file &q_qry
endif
q_frm=trim(q_frm)+".lbl"
goto top
if eof()
clear
do dialog with 10,"None of the records match the query specifications. - Press any key."
wait ""
use
return
endif
dev=" "
if m_device=0
dev="to print"
endif
clear
on escape do stoprpt
set escape on
label form &q_frm &dev
set escape off
on escape
use
call cursoff
if m_device=1
wait
endif
return