DEFINE FRAME cust-frame
Customer.CustNum SKIP Customer.Name SKIP Customer.Address SKIP Customer.Address2 SKIP Customer.City Customer.State SKIP Customer.SalesRep HELP "To see a list of values, press F6." WITH DOWN SIDE-LABELS. REPEAT WITH FRAME cust-frame: PROMPT-FOR Customer.CustNum. FIND Customer USING Customer.CustNum. UPDATE Customer.Name Customer.Address Customer.Address2 Customer.City Customer.State Customer.SalesRep EDITING: READKEY. IF FRAME-FIELD = "salesrep" AND LASTKEY = KEYCODE("F6") THEN DO: FOR EACH SalesRep NO-LOCK: DISPLAY SalesRep.SalesRep WITH NO-LABELS 9 DOWN COLUMN 60 ROW 5. END. END. ELSE APPLY LASTKEY. END. /* UPDATE */ END. /* REPEAT */ |
DEFINE FRAME cust-frame
Customer.CustNum SKIP Customer.Name SKIP Customer.Address SKIP Customer.Address2 SKIP Customer.City Customer.State SKIP Customer.SalesRep HELP "To see a list of values, press F6." WITH DOWN SIDE-LABELS. ON F6 OF Customer.SalesRep DO: FOR EACH SalesRep NO-LOCK: DISPLAY SalesRep.SalesRep WITH NO-LABELS 9 DOWN COLUMN 60 ROW 5. END. END. REPEAT WITH FRAME cust-frame: PROMPT-FOR Customer.CustNum. FIND Customer EXCLUSIVE-LOCK USING Customer.CustNum. UPDATE Customer.Name Customer.Address Customer.Address2 Customer.City Customer.State Customer.SalesRep. END. |
DEFINE FRAME cust-frame
Customer.CustNum SKIP Customer.Name SKIP Customer.Address SKIP Customer.Address2 SKIP Customer.City Customer.State SKIP Customer.SalesRep HELP "Use the space bar to scroll the values." WITH SIDE-LABELS. REPEAT WITH FRAME cust-frame: PROMPT-FOR Customer.Custnum. FIND Customer EXCLUSIVE-LOCK USING Customer.Custnum. UPDATE Customer.Name Customer.Address Customer.City Customer.State Customer.SalesRep EDITING: READKEY. IF FRAME-FIELD <> "salesrep" THEN APPLY LASTKEY. ELSE DO: IF LASTKEY = KEYCODE(" ") THEN DO: FIND NEXT SalesRep NO-LOCK NO-ERROR. IF NOT AVAILABLE SalesRep THEN FIND FIRST SalesRep NO-LOCK. DISPLAY SalesRep.SalesRep @ Customer.SalesRep. END. ELSE IF LOOKUP(KEYFUNCTION(LASTKEY), "TAB,BACK-TAB,GO,END-ERROR") > 0 THEN APPLY LASTKEY. ELSE BELL. END. END. /* UPDATE */ END. /* REPEAT */ |
DEFINE FRAME cust-frame
Customer.Custnum SKIP Customer.Name SKIP Customer.Address SKIP Customer.Address2 SKIP Customer.City SKIP Customer.State SKIP Customer.SalesRep HELP "Use the space bar to scroll the values" WITH SIDE-LABELS. ON " " OF Customer.SalesRep DO: FIND NEXT SalesRep NO-LOCK NO-ERROR. IF NOT AVAILABLE SalesRep THEN FIND FIRST SalesRep NO-LOCK. DISPLAY SalesRep.SalesRep @ Customer.SalesRep WITH FRAME cust-frame. RETURN NO-APPLY. END. ON ANY-PRINTABLE OF Customer.SalesRep DO: BELL. RETURN NO-APPLY. END. REPEAT WITH FRAME cust-frame: PROMPT-FOR Customer.CustNum. FIND Customer EXCLUSIVE-LOCK USING Customer.CustNum. FIND SalesRep OF Customer NO-LOCK. UPDATE Customer.Name Customer.Address Customer.Address2 Customer.City Customer.State Customer.SalesRep. END. |
DEFINE FRAME cust-frame
Customer.CustNum SKIP Customer.Name SKIP Customer.Address SKIP Customer.Address2 SKIP Customer.City Customer.State SKIP Customer.SalesRep WITH SIDE-LABELS. REPEAT WITH FRAME cust-frame: PROMPT-FOR Customer.CustNum. FIND Customer EXCLUSIVE-LOCK USING Customer.CustNum. MESSAGE "Press F6 to see the previous Customer.". UPDATE Customer.Name Customer.Address Customer.Address2 Customer.City Customer.State Customer.SalesRep EDITING: READKEY. IF KEYLABEL(LASTKEY) = "F6" THEN DO: FIND PREV Customer NO-LOCK NO-ERROR. IF NOT AVAILABLE Customer THEN FIND FIRST Customer NO-LOCK. DISPLAY Customer.CustNum Customer.Name Customer.Address Customer.City Customer.State Customer.SalesRep WITH FRAME cust-frame. END. ELSE APPLY LASTKEY. END. HIDE MESSAGE. END. |
DEFINE FRAME cust-frame
Customer.CustCum SKIP Customer.Name SKIP Customer.Address SKIP Customer.Address2 SKIP Customer.City Customer.State SKIP Customer.SalesRep WITH SIDE-LABELS. ON F6 ANYWHERE DO: IF FRAME-FIELD = "custnum" THEN RETURN NO-APPLY. FIND PREV Customer NO-ERROR. IF NOT AVAILABLE Customer THEN FIND FIRST Customer. DISPLAY Customer.CustNum Customer.Name Customer.Address Customer.City Customer.State Customer.Salesep WITH FRAME cust-frame. END. /* ON F6 */ REPEAT WITH FRAME cust-frame: PROMPT-FOR Customer.CustNum. FIND Customer EXCLUSIVE-LOCK USING Customer.CustNum. MESSAGE "Press F6 to see the previous Customer.". UPDATE Customer.Name Customer.Address Customer.Address2 Customer.City Customer.State Customer.SalesRep. HIDE MESSAGE. END. |
ON F6 OF Name, Address, Address2, City, State, SalesRep
|