Ver Mensaje Individual
  #13  
Antiguo 09-11-2006
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Reputación: 25
Caral Va por buen camino
Vamos a ver tal vez lo del filtro no te funciono, otra solucion.
Coloca esta vez dos query, uno obtendra, los datos para llenar el combobox y el otro colocara la informacion filtrada en el dbgrid asi:
Primer query: Coloca informacion combo:
Código Delphi [-]
AdoQuery1.SQL.Text := 'Select PRODUCTO1 From ARTIC';
   AdoQuery1.Active := True;
   While not AdoQuery1.Eof do
   begin
      Combobox1.Items.Add(AdoQuery1.Fields[0].Text);
      AdoQuery1.Next;
   end;
Segundo query: Coloca informacion filtrada en dbgrid:
Nota: este segundo query, tiene que tener un datasource ligado y este datasource tiene que estar ligado al dbgrid.
Código Delphi [-]
ADOQuery2.Active:= False;
  ADOQuery2.SQL.Text:= 'SELECT * From ARTIC';
  ADOQuery2.SQL.Add('WHERE (((ARTIC.PRODUCTO1)="'+Combobox1.Text+''"'));
  ADOQuery2.Active:= True;
Espero te sirva
Saludos
Responder Con Cita