Ver Mensaje Individual
  #3  
Antiguo 30-01-2015
maxzama maxzama is offline
Miembro
NULL
 
Registrado: jun 2011
Posts: 126
Reputación: 13
maxzama Va por buen camino
Estoy utilisando DBLook y DBCombobox(para los siguientes campos).

y al seleccionar el año, deberia mostrarme los meses de ese año(de los que estan registrado), y al seleccionar el mes deberia mostrarme las semanas del mes seleccionado.

Pero aparece el siguiente error, al seleccionar el año.

Error Sistema: Could not convert variant of type (null) into type (OleStr).

Codigo:

Código Delphi [-]
begin
  //    combobox6.Clear;
      Dmodulo.Ano.SQL.Clear ;
      Dmodulo.Ano.SQL.Add('select * from ANOS where ANO=:A');
      Dmodulo.Ano.ParamByName('A').Value:=DBLookupComboBox1.Text;
      Dmodulo.Ano.Open;
      Edit6.Text:=Dmodulo.Ano.FieldByName('ANO').Value;


        Dmodulo.Reporte_Cobrado2.SQL.Clear ;
        Dmodulo.Reporte_Cobrado2.SQL.Add('SELECT * FROM REPORTE_COBRADO WHERE ANO=:A');
        Dmodulo.Reporte_Cobrado2.ParamByName('A').Value:=Edit6.Text;
        Dmodulo.Reporte_Cobrado2.Open;

        //Dmodulo.Reporte_Cobrado2.First;
             //while not Dmodulo.Reporte_Cobrado2.Eof do
                   Begin
                         DBComboBox1.Items.Add(DMODULO.Reporte_Cobrado2.FieldByName('Mes').AsString) ;
                          // Dmodulo.Reporte_Cobrado2.Next;
                   end;
end;
Responder Con Cita