Algo como esto, adáptalo:
Código Delphi
[-]
procedure TfrConAlbaran.SpEliminaClick(Sender: TObject);
begin
if Application.MessageBox('¿Seguro que desea elimiar el albarán
seleccionado?','Atención, revise las fechas.',mb_OkCancel +
mb_IconQuestion)= idOk then
begin
askbor:=False;
with DmDatos.LinAlba do
begin
DmDatos.LinAlba.First;
while not DmDatos.LinAlba.Eof do
begin
DmDatos.Linalba.Delete;
end;
end;
DmDatos.Alba.Delete;
askbor:=True;
end;
end;
Un Saludo.