but if you have more then 1 field, like 6 or more you must ever filter on the other fields like
setrange(Field1,false);
if not isempty then begin
//here an loop if you need the recs
end;
setrange(Field1);
setrange(Field2,false);
if not isempty then begin
//here an loop if you need the recs
end;
setrange(Field2);
....
So an other way is to use the Field table in alliance with recref and fieldref.
Fields.reset; //Field Table
Fields.setrange(TableNo,27); //only Table Item
Fields.setrange(Type,Fields.Type::Bool);
Fields.setrange(Class,Fields.Class::Normal);
if Fields.findset(false,false) then begin
RecRef.OPEN(Fields.TableNo);
repeat
RecRef.findfirst; //or a special Rec with get(RecordID) or a loop with findset
FieldsRef := RecRef.FIELD(Fields."No.");
if Format(FieldsRef.VALUE) = 'Nein' then //'No'
message('Feld %1 = %2',Fields.FieldName,FieldsRef.VALUE); //here you can also store the Recs in a temptable or print it out in a report
until Fields.next = 0;
end;
Answers
If there is a index on the field you can also use COUNT.
Thanks
So an other way is to use the Field table in alliance with recref and fieldref.
Regards
RIS Plus, LLC