IF Type(FichaAni2.Field_type) = "C" cWhere = "Upper(AllTrim(" + ; Upper(AllTrim(FichaAni2.Field_name)) + "))" + ' ' + ; AllTrim(FichaAni2.Operador) + ; IIf(FichaAni2.Operador = "=" ,"=","" ) + ' ' + "'" + ; Upper(Alltrim(FichaAni2.Letras)) + "' " ENDIF later , i make cWhere = "SELECT ... ... " + cWhere and &cWhere , works ok && But , when type is numeric , don´t work cWhere = FichaAni2.Field_name + ' ' + ; AllTrim(FichaAni2.Operador) + ' ' + "'" + ; Str(FichaAni2.Numeros) + ")' " && here i need write only FichaAni2.Numeros && if i write Str(FichaAni2.Numeros) , i don´t have the result i need in later sql . if don´t write Str() here , i don´t have an error .Any ideia ?