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
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;
Begin
DBComboBox1.Items.Add(DMODULO.Reporte_Cobrado2.FieldByName('Mes').AsString) ;
end;
end;