A former pharmaceuticals company officer’s legal malpractice suit against Lowenstein Sandler, claiming the firm failed to give him key advice about potential tax consequences tied to exercising nonqualified company stock options, must be dismissed because of his contention’s “speculative nature,” a state appeals court ruled Thursday.

The “theory of proximate cause [that the lack of tax advice led to the former senior vice president losing millions of dollars] is belied by the record and relies on gross speculation,” an Appellate Division, First Department panel wrote in its decision.