ON KEY LABEL RIGHTMOUSE && Remember to reset the OKL
RELEASE WINDOW Dmkey
RETURN
PROCEDURE Dlookup
SET PROCEDURE TO Lookup
NumLkp = "0"
SELECT A
USE Account ORDER Name IN A
USE Policy ORDER Acct IN B
SET RELATION TO Acc_Pnum INTO Policy
DEFINE WINDOW Acc_Lookup FROM 17, 0 TO 22, 66 FLOAT
ACTIVATE WINDOW Acc_Lookup
@ 0, 1 SAY "<F1> - Lookup Help"
@ 1, 1 SAY "<F2> - Edit Account"
@ 2, 1 SAY "<F3> - Policy (1-Many) Lookup"
@ 3, 1 SAY "Account Lookup Screen - Tap <Esc> to Exit"
PUSH KEY
ON KEY LABEL F1 DO Hlp
ON KEY LABEL F2 DO Edt
ON KEY LABEL F3 DO Pol
DO Lokup WITH "Accounts",' ACCOUNT.ACC_NAME:H="Account Name", ACCOUNT.ACC_PNUM:H="Acc #", ACCOUNT.ACC_STATE:H="State",Fnd=FOUND("Policy"):H="Policy"','';
,5,0,16,70,ALIAS(),'ACCOUNT','','NONE','NONE'
POP KEY
RELEASE WINDOW Acc_lookup
SET PROCEDURE TO
RETURN
PROCEDURE Hlp
* Part of the Dlookup Routine...this is called when
* you press the F1 key from the Browse window!
PUSH KEY CLEAR && Remember to Save our old OKL's!
DEFINE WINDOW Hlp FROM 15,5 TO 22,70 DOUBLE TITLE "edit me!"
ACTIVATE WINDOW Hlp
@0,0 SAY "This is help...not much in terms of"
@1,0 SAY "Excitement, but you would put your "
@2,0 SAY "Message here to calm people's nerves..."
X=INKEY(0)
POP KEY && Remember to Reset our old OKL's!
RELEASE WINDOW Hlp
RETURN
PROCEDURE Edt
* Part of the Dlookup Routine...this is called when
* you press the F2 key from the Browse window!
PUSH KEY CLEAR && Remember to Save our old OKL's!
DEFINE WINDOW EDT FROM 15,5 TO 22,70 DOUBLE TITLE "edit me!"
ACTIVATE WINDOW Edt
@0,0 SAY "Name: " GET Acc_name
@1,0 SAY "Address: " GET Acc_adrs
READ
POP KEY && Remember to Reset our old OKL's!
RELEASE WINDOW Edt
RETURN
PROCEDURE Pol
* Part of the Dlookup Routine...this is called when
* you press the F3 key from the Browse window!
PUSH KEY CLEAR && Remember to Save our old OKL's!
DEFINE WINDOW Pol_Lookup FROM 18, 10 TO 22, 56 FLOAT
ACTIVATE WINDOW Pol_Lookup
@ 0, 1 SAY "Nested Lookup Window"
@ 1, 1 SAY "Neat, huh?"
@ 2, 1 SAY "Policy Lookup Screen - Tap <Esc> to Exit"
DO Lokup WITH "Policy",' Policy.Pol_acct:H="Policy #", Policy.Status:H="Status", Policy.Pol_Date:H="Date"','';