cOld=ALLTRIM(THIS.VALUE)
cNew=''
FOR lnCnt=1 TO LEN(cOld) IF INLIST(SUBSTR(cOld,lnCnt,1),'A','B','C','D','E','F','G','H','I','J') cNew=cNew+SUBSTR(cOld,lnCnt,1) ENDIF
ENDFOR
THIS.VALUE=cNew
THIS.SELSTART=LEN(cNew)
THISFORM.TEXT2.VALUE=cNew
修改一下,适应大写和小写
cOld=ALLTRIM(THIS.VALUE)
cNew=''
FOR lnCnt=1 TO LEN(cOld) IF SUBSTR(cOld,lnCnt,1)$'ABCDEFGHIJabcdefghij' cNew=cNew+SUBSTR(cOld,lnCnt,1) ENDIF
ENDFOR
THIS.VALUE=cNew
THIS.SELSTART=LEN(cNew)
THISFORM.TEXT2.VALUE=cNew