 {r}prm SelectTab(objName event);qt;rd;tb;nextTab;int

 r1
x qtprm
 nextTab qtprm
 :If rValidateTabData objName
    CURRENTTABobjName
     CurrTabnextTab
 :EndIf

 ReflectAllData

 :If qt#.CONSTANTS.QUOTETYPES.(ADHOC L70 CUPAS S226)
     NB. in SVQ11 tab activity is not a fn of user choices after download
     NB. bypasses ResTab
     rdScreenData#.IPMiota
     tb#.Top.TB
     (WNtb).Active1
     :If qt#.CONSTANTS.QUOTETYPES.S226
         tb.(T4 T5).Active'Payment' 'NU Pension'rd'PREPR' 'EXIBY'
         tb.T5.Active'PreSimplification' 'Triviality' 1rd'EDITN' 'EXIBY' 'ISPRP'
     :Else
         tb.(T3 T4).Active'Payment' 'NU Pension'rd'PREPR' 'EXIBY'
         tb.T4.Active'PreSimplification' 'Triviality' 1rd'EDITN' 'EXIBY' 'ISPRP'
     :EndIf

     ptinsScreenData[#.IPMiota,'PTINS']   write out grid data
     :If (0ptins)^/0<ptins[;1]
         (1ResTab).Active1
         :If '#.Top.TB.T2'objName
     Resultsqt #.CALCS.CALCSData
     Data,4Results
     Coverage1
     ScreenDataCoveragePolicyData
     int'SA(y)' 'RB(y)' 'TBR' 'RB'CollectInterimsResults
     ScreenData[#.IPMiota,'ITRM1']int
     (/0=Results)0
     ReDraw[BuildScreens]1
             (2ResTab).Active1
         :EndIf
     :Else
         ResTab[2]WS'Active' 0
     :EndIf
 :EndIf

Developer_10:  don't remove this! KJ
 (0 CurrTab qt),' ',(CurrTabBuildScreens),' '''''

 lost cross checks for time being : PAG : 18/01/2005
 lost all checks : PAG : 04/04/2005
 rewritten : SJT : 03aug05
 I tried to introduce a general checking mechanism. The explicit result can be used now to prevent the user from changing the tab
 remove absolute deactivation of diary tab (makes testing easier)