Ver Mensaje Individual
  #2  
Antiguo 23-06-2008
Avatar de tcp_ip_es
tcp_ip_es tcp_ip_es is offline
No confirmado
 
Registrado: ago 2003
Ubicación: Madrid
Posts: 635
Reputación: 0
tcp_ip_es Va por buen camino
Lo mismo ya lo has solucionado, ya han pasado 2 semanas desde tu post pero bueno como yo lo haría es asociando el dbgrid a una consulta genérica y cuando pinches los botones cambies dicha consulta: siendo estas las consultas:

Código:
// onclick Boton 1
tquery.close;
tquery.sql.clear;
tquery.sql.add('select f_cad from tclient where f_cad < :DAhora');
tquery.parambyname('DAhora').value:=DateToStr(Date);
tquery.open;

// onclick Boton 2: Para 30 días exactos
tquery.close;
tquery.sql.clear;
tquery.sql.add('select f_cad from tclient where f_cad = :DTreinta);
tquery.parambyname('Dtreinta').value:=DateToStr(Date+30);
tquery.open;

// onclick Boton 3
tquery.close;
tquery.sql.clear;
tquery.sql.add('select f_cad from tclient where f_cad > :DAhora);
tquery.parambyname('DAhora').value:=DateToStr(Date);
tquery.open;
Espero haberte ayudado. Saludos, Tony
Responder Con Cita