Re: field navigation
Posted in 1992
Path: emory!wupost!spool.mu.edu!uunet!halexii!halexv!greg From: greg@halexv.uucp (Gregory F. Hogg) Newsgroups: comp.databases.informix Message-ID: <1992Jan22.142823.1780@halexv.uucp> Date: 22 Jan 92 14:28:23 GMT References: <paulb.695992173@p4.cs.man.ac.uk> Reply-To: greg@halexv.UUCP (Gregory F. Hogg) Organization: HOGG'S SOFTWARE; Abingdon, MD In article <paulb.695992173@p4.cs.man.ac.uk> paulb@p4.cs.man.ac.uk (Paul Bean) writes: >Is there a way to trap the direction in which the cursor is moving >through the fields on a form (ie forwards or backwards). I basically >want to ignore a next field x triggered by an after field y if i am >going backwards. On key(control-k) is not picked up on the input, i >presume it is a restricted key. > >Thanks - Paul Bean I track direction in most all of my 4GL programs. Here is a code fragment of how I do it: DEFINE FieldNbr INTEGER LET FieldNbr = 3 INPUT FieldA, # field 1 FieldB, # field 2 FieldC, # field 3 FieldD # field 4 FROM field_a, field_b, field_c, field_d AFTER FIELD field_a LET FieldNbr = 1 AFTER FIELD field_b # # ----- IF moving forward skip field_c and goto field_d ----- # ----- ELSE moving backward ----- # IF FieldNbr < 2 THEN LET FieldNbr = 2 NEXT FIELD field_d END IF LET FieldNbr = 2 AFTER FIELD field_c LET FieldNbr = 3 AFTER FIELD field_d LET FieldNbr = 4 END INPUT -- +++++++++++++++++ +++++++++++++++++++ Greg Hogg +++ +++