home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol12n07.zip
/
DELKEY.SC
next >
Wrap
Text File
|
1993-03-11
|
872b
|
29 lines
CREATELIB "Paradox"
;-----------------------------------------------------------------
; PROC Delkey Paradox
; Create the procedure Delkey to query the user before deleting
; a record
;-----------------------------------------------------------------
PROC Delkey ()
; Only change delete function if editing or coediting and not editing
; a field
IF IMAGETYPE() = "Display" AND (SYSMODE() = "Edit" OR
SYSMODE() = "CoEdit") AND ISFIELDVIEW() = FALSE
THEN BEEP
MESSAGE "Do you really want to delete record #",
RECNO(), "? (y/n)"
x = GETCHAR()
; If the user types "y" delete, otherwise quit
IF x = ASC("y") OR x = ASC("Y")
THEN DEL
ENDIF
ELSE DEL
ENDIF
ENDPROC
WRITELIB "Paradox" Delkey
; Sample Init.sc file
Autolib = "C:\\PDOX\\Paradox"
setkey -83 delkey()