I have an interesting problem.... I have 3 radio buttons with corresponding entry fields .. each of the fields have a when and valid clause ..
when I move the radio button from 1 to 2 the valid fires from the first radio button ... how do I keep the valid from firing when I move the cursor to a different radio button .. I only want the valid to fire when the cursor is in the entry field and the <enter> button is hit .. like an ON ENTER clause ??
- Code: Select all Expand view
REDEFINE RADIO oRAD var nRAD ID 185, 187, 189, 191 of oWork ;
ON CHANGE ( _ChkRadio( nRad,oRad,oL,oV,oD,@xL,@xV,@xD ))
REDEFINE GET oL var xL ID 186 of oWork PICTURE "@!";
when nRAD = 1 ;
Valid _VehGet( oRsWork,cLicense,oLicense,@cVehEid,oVNUMBER,@cVNUMBER,oMAKE,@cMAKE,oTYPE,@cTYPE,oYEAR,;
@cYEAR,oSERIALNUMB,@cSERIALNUMB,;
oPROG,@cPROG,oEQUIP,@cEQUIP,@cProgEid,@cEquipEid,@cDepEid,@cDeputy,@cMotorPool,@cPoolID, "BUTTON",;
@cPropMaint,oPropMaint,nRad,@xL,@xV,@xD,oL,oV,oD) UPDATE
//----------------------------------
Static Func _ChkRadio( nRad,oRad,oL,oV,oD,xL,xV,xD )
Do Case
Case nRad = 1
xL := space(8)
xV := space(5)
xD := space(7)
oL:ReFresh()
oV:ReFresh()
oD:ReFresh()
oL:Enable()
oV:Disable()
oD:Disable()
SysReFresh()
oL:SetFocus()
Return(nil)
Case nRad = 2
xL := space(8)
xV := space(5)
xD := space(7)
oL:ReFresh()
oV:ReFresh()
oD:ReFresh()
oL:Disable()
oV:Enable()
oD:Disable()
SysReFresh()
oV:SetFocus()
Return(nil)
Case nRad = 3
xL := space(8)
xV := space(5)
xD := space(7)
oL:ReFresh()
oV:ReFresh()
oD:ReFresh()
oL:Disable()
oV:Disable()
oD:Enable()
SysReFresh()
oD:SetFocus()
Return(nil)
ENdCase
Return(nil)