I'm doing a program that filters dates from three tables in my database, the problem is when I do a search, it only shows me a table and not the three tables that I want. This is my code
query.Close;
query.SQL.Clear;
query.SQL.Text := ('select campo1,campo2 from tabla1 where campo3 >= :fecha1 and campo3 <= :fecha2 '+ ' union all '+
'select campo1,campo2 from tabla2 where campo3 >= :fecha1 and campo3 <= :fecha2 '+ 'union all '+ 'select campo1,campo2 from tabla3 where campo3 >= :fecha1 and campo3 <= :fecha2 order by coberturafechahasta ');
query.Parameters.ParamByName('fecha1').Value:= FormatDateTime('dd/mm/yyyy',Datetimepicker1.Date);
query.Parameters.ParamByName('fecha2').Value:= FormatDateTime('dd/mm/yyyy',Datetimepicker2.Date);
query.Open;
use composenetes ado and MS ACCESS as a database