Código Delphi
[-]
with Query1 do
begin
SQL.Clear;
Close;
SQL.Text := 'Select max(codigo) as Maximo from clientes';
Open;
Edit1.Text := FormatFloat('0000000', StrToFloat(FloatToStr(FieldByName('CODIGO').AsInteger +1)));
Close;
Active := False;
end;
esto se puede arreglar:
Código Delphi
[-]
Edit1.Text := FormatFloat('0000000', StrToFloat(FloatToStr(FieldByName('CODIGO').AsInteger +1)));