
998 So.2d 128 (2008)
LUTZ OIL & GAS, L.L.C., Jordan Operations, Inc., Ronald J. Lutz, Jr. and Paula M. Lutz
v.
PRIDE ENERGY COMPANY, Lobrano and Lobrano, L.L.C., and Francis Jay Lobrano.
No. 2007-CA-1291.
Court of Appeal of Louisiana, Fourth Circuit.
October 15, 2008.
Timothy W. Cerniglia, Colvin, Weaver & Cerniglia, L.L.C., Metairie, LA, Pamela N. Breedlove, Colvin Weaver & Cerniglia, *129 L.L.C., Shreveport, LA, for Plaintiffs/Appellants, Lutz Oil and Gas, L.L.C., Jordan Operations, Inc., Ronald J. Lutz, Jr., and Paula M. Lutz.
James H. Gibson, Allen & Gooch, Lafayette, LA, for Defendants/Appellees, Lobrano and Lobrano, L.L.C., and Francis Jay Lobrano.
Court composed of Judge JAMES F. McKAY, III, Judge EDWIN A. LOMBARD, Judge Pro Tempore MOON LANDRIEU.
MOON LANDRIEU, Judge Pro Tempore.
Plaintiffs Ronald J. Lutz, Jr.; Paula M. Lutz; and Jordan Operations, Inc. ("Jordan"), appeal the district court's judgment insofar as it granted the exception of no right of action asserted by defendants Lobrano and Lobrano, LLC, and Francis Jay Lobrano ("the Lobrano defendants") dismissing with prejudice these plaintiffs' claims against the exceptors. For the reasons that follow, we reverse and remand.

FACTS AND PROCEEDINGS BELOW
The three plaintiffs that are appellants herein, as well as Lutz Oil & Gas Company, LLC ("Lutz Oil") filed suit February 10, 2006, against the Lobrano defendants and Pride Energy Company ("Pride"). The petition alleges that in the summer of 2003, plaintiffs Ronald and Paula Lutz met with and retained attorney Francis Jay Lobrano to advise them and perform legal work connected to the Lutzes' contemplated purchase of an oil and gas leasehold interest from Pride. At the time, the Lutzes already owned Jordan, a subchapter S corporation which had equipment and resources they believed would be useful in working the leases they were considering buying from Pride. Mr. Lobrano also advised Jordan through its officer, Paula Lutz. Pursuant to Mr. Lobrano's advice, the Lutzes formed a new corporation, Lutz Oil, to acquire Pride's leasehold interest. According to the plaintiffs' petition, Pride had represented to Ronald Lutz that it owned a 100% working interest in the leasehold serviced by two particular wells and a 99.6% interest in the leasehold serviced by a third well, but Pride did not warrant title to the leases. The petition further alleges that, because the Lutzes had never before acquired an oil and gas lease, they relied upon Mr. Lobrano to "advise [them] legally as to all pertinent issues in the acquisition of the oil and gas leasehold interests from Pride, and to handle all legal issues relating to the proposed acquisition, including any research or investigation required to confirm that plaintiffs would receive the net revenues and working interest as represented by Pride, and to form Lutz Oil and Gas, as the entity which would actually purchase the interests of Pride."
The petition goes on to allege that Mr. Lobrano, after several meetings with Paula Lutz, assured plaintiffs that he had performed all necessary and appropriate research and had determined that Pride had clear title to the leasehold as it had represented. On October 23, 2003, the plaintiffs executed before Mr. Lobrano an Assignment and Bill of Sale between Pride and Lutz Oil. On February 10, 2005, after the Lutzes allegedly had invested substantial amounts of personal and borrowed funds into re-working the leasehold interest and had diverted Jordan's business, equipment and resources exclusively into the re-working effort, Paula Lutz was contacted by a representative of Blenheim Energy, Inc., who advised her for the first time that Blenheim actually owned a 56% working interest in the leasehold.
The Lutzes then retained other counsel to ascertain the accuracy of the Blenheim *130 claim and discovered that Pride, by means of a 1999 act of sale, had acquired only a 44% working interest in the leasehold; therefore, Lutz Oil, by means of its 2003 acquisition from Pride, owned only a 44% interest rather than the 99-100% interest the plaintiffs had believed they were purchasing. Plaintiffs' petition alleges that Pride is liable for a knowing misrepresentation of the facts, and that the Lobrano defendants are liable for negligent legal representation on account of Mr. Lobrano's failure to discover the true extent of Pride's ownership interest.
The Lobrano defendants filed exceptions of improper cumulation of actions, no cause of action and no right of action, which were heard on April 5, 2007. By judgment dated June 15, 2007, the district court severed the plaintiffs' claims against Pride from those against the Lobrano defendants, thereby pretermitting the exception of improper cumulation; granted the exception of no right of action as to the claims asserted by Ronald Lutz, Paula Lutz and Jordan, but not as to the claims of Lutz Oil; denied as moot the exception of no cause of action; and dismissed with prejudice the claims of Ronald Lutz, Paula Lutz and Jordan against the Lobrano defendants. The three plaintiffs whose claims were dismissed now appeal the granting of the exception of no right of action and the dismissal of their claims.

DISCUSSION
The sole issue on appeal is whether the district court erred by finding that the appellants have no right of action against the Lobrano defendants.
Whether a plaintiff has a right of action is a question of law subject to de novo review. Oakville Community Action Group v. Plaquemines Parish Council, 05-1501, p. 3 (La.App. 4 Cir. 9/27/06), 942 So.2d 1152, 1155. The function of the exception of no right of action is to determine whether the plaintiff belongs to the class of persons to whom the law grants the cause of action asserted in the petition. Badeaux v. Southwest Computer Bureau, Inc., 05-612, 05-719, p. 6 (La.3/17/06), 929 So.2d 1211, 1217.
Although the trial court did not issue reasons for judgment in the instant case, the transcript of the hearing reflects that the trial court granted the exception because it determined that Ronald and Paula Lutz, as shareholders of the corporation Lutz Oil, do not have a separate or individual right of action against third parties (in this case, the Lobrano defendants) for wrongs allegedly committed against or causing damage to the corporation; only the corporation has a right of action.[1] See, e.g.: Glod v. Baker, 02-988, p. 12 (La.App. 3 Cir. 8/6/03), 851 So.2d 1255, 1264.
The appellants argue that the trial court's determination is wrong because Ronald and Paula Lutz (in her individual capacity as well as in her capacity as an officer of Jordan) sought and received legal advice from Mr. Lobrano prior to the formation of Lutz Oil. In fact, at the time the Lutzes procured the services of Mr. Lobrano, Lutz Oil did not exist. In their petition, the Lutzes specifically allege that, based upon Mr. Lobrano's advice, they invested substantial amounts of personal funds and mortgaged equipment owned by Jordan in order to purchase Pride's leasehold interest, and further that, if the Lutzes had known that Pride's interest was not 100%, they would not have acquired the interest (and, it follows, would not have had to form Lutz Oil).
*131 Our review of the petition reveals that the plaintiffs have stated a cause of action in legal malpractice against the Lobrano defendants. On appeal, the pertinent question is whether the trial court was correct in deciding that Lutz Oil is the only plaintiff entitled to assert that cause of action.
The elements of the tort of legal malpractice are: (1) the existence of an attorney-client relationship; (2) negligent representation by the attorney; and (3) loss to the client caused by that negligence. Francois v. Andry, 05-388, pp. 6-7(La.App. 4 Cir. 4/5/06), 930 So.2d 995, 998 (citing Francois v. Reed, 97-1328, p. 4 (La.App. 1 Cir. 5/15/98), 714 So.2d 228, 229-230). The existence of an attorney-client relationship turns largely on the client's subjective belief that it exists. Id. (citing Louisiana State Bar Association v. Bosworth, 481 So.2d 567, 571 (La.1986)).
In the instant case, based upon the facts alleged in the petition and those adduced at the hearing, Ronald and Paula Lutz clearly had established an attorney-client relationship with Mr. Lobrano prior to the formation of Lutz Oil. Moreover, Mr. Lobrano was aware at the time the Lutzes contacted him that they owned a subchapter S corporation, namely Jordan, for whose benefit they also were seeking advice. Finally, the petition alleges that Mr. Lobrano's negligence caused losses to the Lutzes and Jordan that are not the same as the losses allegedly suffered by Lutz Oil. For example, the Lutzes invested personal funds, incurred fees for work done by Mr. Lobrano, and mortgaged equipment owned by Jordan. For these reasons, the instant case is not analogous to the shareholder actions apparently relied upon by the trial court in granting the exception of no right of action. In view of the record, we conclude that Ronald Lutz, Paula Lutz and Jordan each have a right of action to assert legal malpractice against the Lobrano defendants. We therefore find that the trial court erred by granting the exception of no right of action and dismissing appellants' claims.

CONCLUSION
Accordingly, we reverse the trial court's judgment insofar as it grants the exception of no right of action. We reinstate the appellants' claims and remand for further proceedings consistent with this opinion.
REVERSED AND REMANDED.
NOTES
[1]  The record does not reveal the basis for the trial court's determination that Jordan Operations, Inc., also has no right of action against the Lobrano defendants.
