
768 A.2d 858 (2001)
Eugene L. MILLER, Appellant,
v.
John F. NELSON, Appellee.
Superior Court of Pennsylvania.
Argued October 31, 2000.
Filed January 11, 2001.
Reargument Denied March 22, 2001.
*859 Eugene L. Miller, appellant, pro se.
George T. McCool, Conshohocken, for appellee.
Before POPOVICH, EAKIN and BECK, JJ.
EAKIN, J.:
¶ 1 Eugene Miller appeals the order entering judgment on the pleadings in favor *860 of John F. Nelson, and dismissing Miller's complaint. The trial court also awarded Nelson counsel fees of $4,489. We affirm and remand for calculation of attorneys' fees incurred in this appeal.
¶ 2 This action has its roots in a landlord-tenant dispute between Miller and his tenant, Johannah Bruch. Bruch rented an apartment from Miller and attempted to pay rent with a check ultimately dishonored by her bank. In a civil complaint, Miller claimed damages of approximately $8,000, and the record shows Miller obtained judgment against Bruch.
¶ 3 In addition to the civil action, Miller attempted to file a private criminal complaint against Bruch for passing a bad check. Pennsylvania Rule Criminal Procedure 106 gives the district attorney authority to approve or disapprove criminal charges which private citizens wish to have filed. Nelson, District Attorney of Franklin County, declined to approve the charge due to lack of evidence and because Miller had obtained a civil judgment against Bruch. When such a request is denied, the rule provides "the affiant may petition the court of common pleas for review of the decision." Pa.R.Crim.P. 106(b)(2). Accordingly, Miller filed a petition requesting review of Nelson's decision.
¶ 4 By order of April 13, 1999, the common pleas court denied that petition and determined Nelson had not abused his discretion. In his order of April 13, 1999, President Judge John R. Walker opined the check "created a civil loan, not a crime" because the word "hold" was written in the memo section of the check. The court also found "the private criminal complaint lacks legal sufficiency for any criminal charges." Miller did not appeal the trial court's determination that Nelson did not abuse his discretion in disapproving the private criminal complaint; that issue is not before us.
¶ 5 On August 12, 1999, Miller filed a civil district justice complaint against Nelson. Miller alleged Nelson denied him his civil rights in refusing to approve criminal charges against Bruch, and demanded both compensatory and punitive damages. By letter of August 20, 1999, Nelson advised Miller he would pursue a judgment against Miller for counsel fees if he refused to withdraw his "clearly frivolous" action. When Miller did not withdraw his complaint, Nelson invoked his immunity from civil liability for the performance of his prosecutorial functions and on October 25, 1999, filed a cross-claim against Miller requesting attorneys' fees and costs. On October 29, 1999, the district justice entered judgment for Nelson and against Miller in the amount of $1,898.60.
¶ 6 Miller filed a timely appeal with the Franklin County Court of Common Pleas, filing his complaint December 6, 1999. On December 27, 1999, Nelson filed an answer and counterclaim seeking attorneys' fees pursuant to 42 Pa.C.S. § 2503. On that same date, Nelson filed a motion for judgment on the pleadings, requesting dismissal of Miller's complaint. On March 3, 2000, the Honorable Keith B. Quigley, specially presiding, granted Nelson's motion and dismissed Miller's lawsuit. This timely appeal followed.
Entry of judgment on the pleadings is permitted under Pa.R.C.P. 1034 which provides for such judgment after the pleadings are closed, but within such time as not to delay trial. A motion for judgment on the pleadings is similar to a demurrer. It may be entered when there are no disputed issues of fact and the moving party is entitled to judgment as a matter of law. In determining if there is a dispute as to facts, the court must confine its consideration to the pleadings and relevant documents. The scope of review on an appeal from the grant of judgment on the pleadings is plenary. We must determine if the action of the court below was based on a clear error of law or whether there were facts disclosed by the pleadings which should properly go to the jury.
*861 Citicorp North America, Inc. v. Thornton, 707 A.2d 536, 538 (Pa.Super.1998) (citations omitted).
¶ 7 The learned trial court determined the doctrine of immunity bars the lawsuit against Nelson. A prosecutor enjoys absolute immunity from liability for civil damages for actions related to prosecution of a criminal case. Imbler v. Pachtman, 424 U.S. 409, 430-31, 96 S.Ct. 984, 47 L.Ed.2d 128 (1976). Since the decision whether to initiate a prosecution "is at the core of a prosecutor's judicial role," Kulwicki v. Dawson, 969 F.2d 1454, 1463-64 (3d Cir.1992), this immunity encompasses a decision whether to prosecute. Panayotides v. Rabenold, 35 F.Supp.2d 411, 416 (E.D.Pa.1999), aff'd, 210 F.3d 358 (3d Cir. 2000). "The purpose of absolute immunity is to protect the function of the prosecutor as a key participant in the criminal process." Williams v. Hartje, 827 F.2d 1203, 1208 (8th Cir.1987). As the Supreme Court reasoned in Imbler:
A prosecutor is duty bound to exercise his best judgment both in deciding which suits to bring and in conducting them in court. The public trust of the prosecutor's office would suffer if he were constrained in making every decision by the consequences in terms of his own potential liability in a suit for damages. Such suits could be expected with some frequency, for a defendant often will transform his resentment at being prosecuted into the ascription of improper and malicious actions to the State's advocate. Further, if the prosecutor could be made to answer in court each time such a person charged him with wrongdoing, his energy and attention would be diverted from the pressing duty of enforcing the criminal law.... Frequently acting under serious constraints of time and even information, a prosecutor inevitably makes many decisions that could engender colorable claims of constitutional deprivation. Defending these decisions, often years after they were made, could impose unique and intolerable burdens upon a prosecutor responsible annually for hundreds of indictments and trials.
Id., at 424-26, 96 S.Ct. 984 (citations omitted).
¶ 8 While more complaints are spawned by charges filed than charges declined, the immunity is the same, and it is absolute. In light of this principle, we conclude Miller's claim is without legal merit, and District Attorney Nelson clearly was entitled to judgment on the pleadings as a matter of law.
¶ 9 Our review of a trial court's award of attorneys' fees is limited. We may only consider whether the court "palpably abused its discretion in making a fee award." Thunberg v. Strause, 545 Pa. 607, 682 A.2d 295, 299 (1996). We may not disturb the award if the record supports the trial court's finding that Miller violated the relevant conduct provision of the Judicial Code. In re Estate of Schram, 696 A.2d 1206, 1213 (Pa.Cmwlth.1997), appeal denied, 550 Pa. 712, 705 A.2d 1313 (1997). The Judicial Code permits an award of reasonable counsel fees "as a sanction against another participant for dilatory, obdurate or vexatious conduct during the pendency of a matter." 42 Pa.C.S. § 2503(7). Moreover, the court may award counsel fees "because the conduct of another party in commencing the matter or otherwise was arbitrary, vexatious or in bad faith." 42 Pa.C.S. § 2503(9). Such awards represent an attempt to curtail the filing of lawsuits which are frivolous or otherwise improper. Thunberg, at 300.
¶ 10 Here, the record discloses Miller was advised a number of times that his lawsuit against Nelson was barred by the doctrine of immunity. Since Miller persisted after he was unquestionably advised his suit had no legal basis or possible chance of success, the trial court concluded Nelson was entitled to counsel fees. The trial court found Miller's lawsuit was "meritless, friviolous, vexatious and obdurate." Trial Court Opinion, 3/3/00, at 3.
*862 ¶ 11 The record in this case plainly discloses no abuse of discretion in the court's award of counsel fees. The relentless pursuit of a claim which plainly lacks legal merit warrants an award of counsel fees. See, e.g., In re Estate of Liscio, 432 Pa.Super. 440, 638 A.2d 1019 (1994), appeal denied, 539 Pa. 679, 652 A.2d 1324 (1994) (pursuing claim with no reasonable possibility of success and prolonging litigation justifies award of counsel fees under 42 Pa.C.S. § 2503). A suit is vexatious if brought without legal or factual grounds and if the action served the sole purpose of causing annoyance. Thunberg, at 299.
¶ 12 Miller insisted on pursuing his cause against Nelson even though fully and repeatedly informed his claims had no merit. It is apparent from his pro se filings Miller feels overwhelmed by the perceived injustice of Bruch escaping criminal punishment, and finds no comfort in a civil judgment which he is unable to collect. However, criminal charges are brought in the name of the Commonwealth, not the victim, and not all dishonored checks violate the criminal statutes. Miller's relentless legal crusade (and his unwillingness to acknowledge the reality of prosecutorial immunity) does not excuse his abuse of the judicial system.
¶ 13 The Rules of Appellate Procedure permit this Court to award counsel fees or other damages where it determines
an appeal is frivolous or taken solely for delay or that the conduct of the participant against whom costs are to be imposed is dilatory, obdurate or vexatious. The appellate court may remand the case to the trial court to determine the amount of damages authorized by this rule.
Pa.R.A.P. 2744(2). An appeal is deemed frivolous if it lacks any basis in law or fact. Thunberg, at 302. As discussed fully above, Miller's claims against Nelson unquestionably lack legal merit, and Miller knew it. He heard it from Nelson. He heard it from the trial court. Now he has heard it from us. We do not expect he will like it any more than he did before, but that dislike does not permit him to continue vexing or creating legal expense for this respected public servant. Simply put, Miller must accept the fact that Bruch's wrong does not excuse his harassment and legal pursuit of the District Attorney.
¶ 14 We affirm the order granting judgment on the pleadings, dismissing Miller's lawsuit and awarding counsel fees. Nelson also seeks an award of the counsel fees incurred in defending this appeal. We grant Nelson's request for an award of counsel fees, and remand the case to the trial court for calculation of reasonable fees incurred by Nelson in this appeal, to be paid by Miller.
¶ 15 Order affirmed. Case remanded for calculation of attorneys' fees. Jurisdiction relinquished.
