******************************************************************** * Description.......: TargetFld.InteractiveChange() * Calling Samples...: * Parameter List....: * Created by........: Nadya Nosonovsky 06/23/2000 10:30:34 AM * Modified by.......: Nadya Nosonovsky 06/23/2000 12:52:23 PM ******************************************************************** local lcType, lnSize, lnElement, lnFound, lnDigits lcField=alltrim(this.value) && Field Name lnFound=ascan(thisform.abldmflds,lcField) && Search for this field lnElement=asubscript(thisform.abldmflds,lnFound,1) thisform.cFieldType=thisform.abldmflds[lnElement, 2] && The type of the field lcType = thisform.cFieldType lnSize= thisform.abldmflds[lnElement, 3] && Field size lnDigits= thisform.abldmflds[lnElement, 4] && Decimal places if thisform.globOPt.value=1 && Replace with constant with thisform.ReplaceVal do case case lcType = "C" .format='' .inputmask='' .value = "" .format='R' .inputmask=replicate('X',lnSize) case lcType $ "NFIY" .format='' .inputmask='' .value = 0 if lcType='Y' && currency .format='$' endif if lcType='N' if lnDigits>0 .inputmask=replicate('9',lnSize-lnDigits-1)+'.'+replicate('9',lnDigits) else .inputmask=replicate('9',lnSize) endif endif case lcType = "D" && Date .format='' .inputmask='' .value = {} .format='YL' case lcType = "T" && Datetime .format='' .inputmask='' .value = ctot('') .format='YL' case lcType = "L" .format='' .inputmask='' .value = .f. case lcType='M' && Memo .format='' .inputmask='' .value = "" endcase .SetFocus() endwith endif if thisform.globOPt.value=2 && Replace with field thisform.ReplaceFld.SetFocus() endifThanks again all of you for assistance.