var
ModalRes: integer; // ~ TModalResult ~ catcher :o)
begin
With ZConnection2 do begin
[...]
try
Connected := True;
///// try the below to see if that'll work /////
ModalRes:= MessageDlgPos('Access - select database', mtInformation, [mbOk], 0, pt.X, pt.Y-80);
except
on E:Exception do begin
///// try the below to see if that'll work /////
ModalRes:= MessageDlgPos('Access failed !', mtError, [mbOk], 0, pt.X, pt.Y-80);
end;
end;
connected := False;
///// as far as i can remember, modalresults are always positive /////
ModalRes:= -1; // should not interfere with anything
end;
end;