The records of a data grid through a textbox and a button I search by name, identify, address and telephone by means using several filters but when searching I get the error operator/operand type mismatch. this is the code:
IF !EMPTY(THISFORM.Text1.Value)
SET FILTER TO
SET FILTER TO(clientes2.nombre) = ALLTRIM(thisform.text1.Value) OR (clientes2.identifica) = VAL(ALLTRIM(thisform.text1.Value)) OR (clientes2.direccion) = ALLTRIM(thisform.text1.Value) OR (clientes2.telefono) = VAL(ALLTRIM(thisform.text1.Value))
IF FOUND()
THISFORM.Refresh
ELSE
MESSAGEBOX("El valor especificado no existe")
ENDIF
ELSE
MESSAGEBOX("Porfavor introduzca un valor")
ENDIF
IF !EMPTY(THISFORM.Text1.Value)
SET FILTER TO
SET FILTER TO(clientes2.nombre) = ALLTRIM(thisform.text1.Value) OR (clientes2.identifica) = VAL(ALLTRIM(thisform.text1.Value)) OR (clientes2.direccion) = ALLTRIM(thisform.text1.Value) OR (clientes2.telefono) = VAL(ALLTRIM(thisform.text1.Value))
IF FOUND()
THISFORM.Refresh
ELSE
MESSAGEBOX("El valor especificado no existe")
ENDIF
ELSE
MESSAGEBOX("Porfavor introduzca un valor")
ENDIF