Sorry i didnt answer the question about the lost focus calls. They are used to trigger code that is in the lost focus action of the object. I'll post the lost focus code now.
select grants
VATTACH = .F.
VHDAP = .F.
VTBRA = .F.
VESGP = .F.
thisform.cmdbutton_close.enabled=.t.
thisform.pageframe.page1.cmdgo_first.enabled=.t.
thisform.pageframe.page1.cmdgroup.command1.enabled=.t.
thisform.pageframe.page1.cmdgroup.command2.enabled=.t.
IF VFTYPE = 'L' .OR. VFTYPE = 'E' .OR. VFTYPE = 'J'.OR. (VFTYPE = 'C' .AND. SUBSTR(VGRANT_NBR,3,1) = 'L')
if vyear > '1997'
VESGP = .T.
else
vesgp = .f.
endif
ENDIF
IF AT(VFTYPE,"CH") > 0 .AND. AT(SUBSTR(VGRANT_NBR,3,1),"BCDFK") > 0
IF VFTYPE = 'H'
IF AT(SUBSTR(VGRANT_NBR,3,1),"BK") > 0
SELECT FIS_IDIS
vact_nbr = '00'
SET FILTER TO GRANT_NBR = VGRANT_NBR .AND. ACT_NBR = vact_nbr
GO TOP
IF EOF()
ELSE
IF TENURE_TYP = '0'
VTBRA = .T.
ENDIF
IF TENURE_TYP = '1'
VHDAP = .T.
ENDIF
IF TENURE_TYP = '2' .OR. TENURE_TYP = '3'
VATTACH = .T.
IF SETUP_TYPE = '2' .OR. SETUP_TYPE = '3' .OR. SETUP_TYPE = '5'
VREHAB = .F.
ELSE
VREHAB = .T.
ENDIF
ENDIF
ENDIF
SELECT GRANTS
ELSE
SELECT FIS_MAIN
SET FILTER TO GRANT_NBR = VGRANT_NBR
GO TOP
DO WHILE .NOT. EOF()
STORE ACT_NBR TO vact_nbr
SELECT FIS_IDIS
SET FILTER TO GRANT_NBR = VGRANT_NBR .AND. ACT_NBR = vact_nbr
GO TOP
IF EOF()
ELSE
IF TENURE_TYP = '0'
VTBRA = .T.
ENDIF
IF TENURE_TYP = '1'
VHDAP = .T.
ENDIF
IF TENURE_TYP = '2' .OR. TENURE_TYP = '3'
VATTACH = .T.
IF SETUP_TYPE = '2' .OR. SETUP_TYPE = '3' .OR. SETUP_TYPE = '5'
VREHAB = .F.
ELSE
VREHAB = .T.
ENDIF
ENDIF
ENDIF
SELECT FIS_MAIN
SKIP
ENDDO
SET FILTER TO
SELECT GRANTS
ENDIF
ELSE
SELECT FIS_MAIN
SET FILTER TO GRANT_NBR = VGRANT_NBR .AND. ACT_CLASS = 'C' .AND. ACT_AMT > 0
GO TOP
DO WHILE .NOT. EOF()
IF ACT_CODE = '18'
VTBRA = .T.
ENDIF
IF INLIST(ACT_CODE,'21','23','41','60','61')
VATTACH = .T.
IF ACT_CODE = '60'
VREHAB = .F.
ELSE
VREHAB = .T.
ENDIF
ENDIF
IF ACT_CODE = '28'
VHDAP = .T.
ENDIF
IF INLIST(ACT_CODE,'22','45','46')
IF UNIT_MEAS1 = '29' .OR. UNIT_MEAS1 = '55' .OR. UNIT_MEAS1 = '57'
VHDAP = .T.
ELSE
VATTACH = .T.
IF UNIT_MEAS1 = '32'
VREHAB = .T.
ELSE
VREHAB = .F.
ENDIF
ENDIF
ENDIF
SKIP
ENDDO
SET FILTER TO
SELECT GRANTS
ENDIF
ENDIF
do lockcheck
if sys(2011) = 'Record Unlocked'
go top
thisform.lstgrant_nbr.setfocus
else
if vfed_state = "Federal"
thisform.txtgrant_amt.value = (grants.grant_amt + grants.setup_amt)
else
thisform.txtgrant_amt.value = grants.grant_amt
endif
select fis_main
set filter to grant_nbr=vgrant_nbr
go top
vact_code=act_code
if eof()
thisform.pageframe.page1.txtact_amt.value = 0
else
thisform.pageframe.page1.txtact_amt.value = act_amt
endif
select cl_rslt
go top
do lockcheck
if sys(2011) = 'Record Unlocked'
select grants
go top
thisform.lstgrant_nbr.setfocus
else
vnext = 0
this.visible=.f.
thisform.txtfpr_dt_rec.enabled=.t.
thisform.cbofpr_review.enabled=.t.
thisform.txtfpr_to_rev.enabled=.t.
thisform.txtclose_status.enabled=.t.
thisform.cbofpr_comp.enabled=.t.
thisform.txtgrant_nbr.visible=.t.
thisform.txtgrantee.visible=.t.
vgrantee=thisform.txtgrantee.value
thisform.txtgrant_amt.visible=.t.
thisform.txtfpr_dt_rec.visible=.t.
thisform.cbofpr_review.visible=.t.
thisform.txtfpr_to_rev.visible=.t.
thisform.txtclose_status.visible=.t.
if vfed_state = "Federal"
thisform.lblfpr_comp.visible=.t.
thisform.cbofpr_comp.visible=.t.
thisform.cbofpr_comp.value = grants.cert_rec
endif
select grants
thisform.pageframe.page1.cmdgroup.enabled=.t.
thisform.refresh
thisform.txtfpr_dt_rec.setfocus
select cl_rslt
endif
endif
thisform.txtfed_state.enabled=.T.
thisform.txtprog_year.enabled=.T.
thisform.refresh