How do I sort my DBGrid by descending date? I want the latest date to be at the top of the grid. I have tried this code to execute on title click. The table is in a master-detail relationship. If I click the column it does as expected, but if I move to another record in master table I get this error: 'Argument are of the wrong type, are out of acceptable range, or in conflict with one another'
Code:
procedure TfrmMain.dbFuelLogTitleClick(Column: TColumn);
begin
AdatMod.fueling.Sort := ('fYear DESC');
end;