The following test code gets all the records in the database when the button is first clicked. When the button is clicked again, the records that meet the qbe criteria are selected. How can I make the qbe get the correct records on the first click?
procedure TfrmEquipment.Button2Click(Sender: TObject);
begin
dsEquipment.Open;
dsEquipment.QBEMode := True;
dsEquipment['Eqnum'] := '0000122%';
dsEquipment.ExecuteQBE;
end;
procedure TfrmEquipment.Button2Click(Sender: TObject);
begin
dsEquipment.Open;
dsEquipment.QBEMode := True;
dsEquipment['Eqnum'] := '0000122%';
dsEquipment.ExecuteQBE;
end;