Changing Form Tab Focus

Set form tab focus from in the program by moving E@FOLDTABFOC to the control flag field for the form tab that you want to have the focus and E@FOLDTABRES to the other tabs’ control flag fields. In the following example, if the focus is not on the Main tab, then the program sets the focus to that tab.

C                   IF        E@FOLDTABFOC <> F4AF@MNTB 
C                   EVAL      F4AF@CDSTB     = E@FOLDTABRES 
C                   EVAL      F4AF@OPTNST    = E@FOLDTABRES
C                   EVAL      F4AF@MNTB      = E@FOLDTABFOC

Form Tab Focus Considerations

  • Ensure that the focus status is correct by resetting all other tabs before setting focus to another tab. If focus is set to more than one form tab, only the last applies and results might be unpredictable.

  • When changing an item on a detail tab, to see the detail you must set the focus to the parent form tab; it is not automatically made active.