The problem is  on findvariant and when the field to search is not a string.

Here what I did.

VarVar is a variant;

procedure tmainfo.beforeendfilteredit(const sender: tmsebufdataset;
               const akind: filtereditkindty);
begin
i:=0;
with sender do begin
while (i<fields.count) and (fields[i].isnull) do inc(i);
if i<fields.count then varvar:=fields[i].value;
end;end;

procedure tmainfo.afterendfilteredit(const sender: tmsebufdataset;
               const akind: filtereditkindty);
var j:integer;
begin
if akind = fek_find then begin
j:=0;
if not(varisempty(varvar) ) then
with sender do begin
while  (j<indexlocal.count) and 
(fields[i].fieldname<>indexlocal[j].fields[0].fieldname) do inc(j);
if  ( j< indexlocal.count ) and
    (not indexlocal[j].findvariant([varvar],false,true)) then
     showmessage('*** not found ***');
end; end; end;

<<attachment: General list for MSEide+MSEgui.vcf>>

_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to