procedure ShowModalform;var vForm : TMyModalForm;begin vFomr := TMyModalForm.Create(Nil); Try if vForm.ShowModal = mrOK then begin // code to access the data you need. end; finally vForm.Free; end;end;