VCL Delphi

procedure TForm1.Edit1Exit(Sender: TObject);
begin
if Edit1.Text = '' then
Edit1.SetFocus;
end;