Hi Alexander,
OK. If I remove the Close in the procedure TCurrentCustJobsForm.btnSelectClick(Sender: TObject);
Then it works OK.
After some playing around I ended up with the following..
In CurrentCustJobsForm:
procedure TCurrentCustJobsForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
end;
No Select or Close button action. Select has ModalResult of mrOk & Close button has mrClose.
In the calling form I have..
procedure TJobTicketsForm.ShowallJTsforthecurrentJTCustomer1Click(Sender: TObject);
var
iRecord: Integer;
begin
if TCurrentCustJobsForm.Execute(iRecord) then
if iRecord <> 0 then
dmC.JobTickets.Locate('JobNo', iRecord, []);
end;
All good now. I learnt some things about various interactions here.
Regards & Tks,
Ian