Re: ON KEY (ACCEPT)
Posted in 1994
Topics: Server Administration
Well, here's my offering on the subject.<g> Although this may not be the most tidy solution I have found it to be extremely effective. Note: Although I generally use the key field for control, there is no reason why this could not be a single character field hidden in some out of the way place on the form. BTW I don't bother with using [] delimiters anyway as there just ain't that much room on an 80x25 screen and I need it all! LET xint = 0 INPUT assetrec.code, assetrec.descr, assetrec.qty WITHOUT DEFAULTS FROM assetfrm.code, assetfrm.descr, assetfrm.qty BEFORE FIELD assetfrm.code CASE WHEN xint = 1 {quit} EXIT INPUT WHEN xint = 2 {accept} EXIT INPUT END CASE NEXT FIELD assetfrm.descr ...... field processing here ...... ON KEY (F3,ESCAPE) {cancel} LET sysmsgs = "Insert cancelled at user request." CALL sys_msgbox( " " ) # Signify quit and jump to key field. LET xint = 1 NEXT FIELD assetfrm.code AFTER INPUT { accept alias ON KEY (F9,INTERRUPT) } # Signify accept and jump to key field. LET xint = 2 NEXT FIELD assetfrm.code END INPUT IF xint = 2 THEN # process accepted data here END IF Cheers, Ian. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Ian Timms (DBA/Administrator) % Disclaimer: All opinions expressed % % itimms@vprp333q.prop.telecom.com.au % herein are mine and mine alone! % % Ph. 61+3+634-9144 % ==__( pretty piccy goes here )__== % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%