* Code for Text Box .Valid() for Family - Char data - OK * _________________ LOCAL lcExactSet lcExactSet = SET( "Exact") Set Exact Onand assumed that first code is for combo.
* Code for Text Box .Valid() for Operator - Numeric key val - the problem * _________________ LOCAL lcExactSet LOCAL lnValue *************************** *** Assuming that field is integer (no fraction) lnValue = INT(this.Value) lcExactSet = SET( "Exact") Set Exact Off If not INDEXSEEK( m.lnValue, .T., "OPERATOR", "CODE") && If not find this Operator no in Operators table = MESSAGEBOX( "Sorry, Operator " + ALLTRIM( STR( This.Value)) + " does not exist.", ; MB_ICONSTOP, "Operator does not exist") With Thisform .cmdPreview.enabled = .F. .cmdPrint.enabled = .F. EndWith Else With Thisform With .cboOperators .Value = m.lnValue EndWith If .lValidStart; and .lValidEnd .cmdPreview.enabled = .T. .cmdPrint.enabled = .T. EndIf EndWith Endif Set Exact &lcExactSet