
864 S.W.2d 78 (1992)
Gail Yvonne POLK, Appellant,
v.
Constable Bob BRADDOCK; Clerk of Justice Court of Precinct Five, Dallas County; and Donald Austin, Appellees.
No. 05-91-00877-CV.
Court of Appeals of Texas, Dallas.
November 10, 1992.
Rehearing Denied December 21, 1992.
Robert W. Doggett, Dallas, for appellant.
Henry J. Voegtle, Dallas, for appellees.
Before BAKER, CHAPMAN and WIGGINS, JJ.


*79 OPINION
WIGGINS, Justice.
Gail Yvonne Polk appeals from the county court at law's dismissal of her mandamus action. In four points of error, she contends that the county court erred in dismissing her request for relief for lack of jurisdiction because (1) the county court at law[1] has the power to issue a writ of mandamus when the amount in controversy falls within its jurisdictional limits; (2) the county court has the power to issue a writ of mandamus to enforce and protect its jurisdiction, and to remove impediments to appeal; (3) the complete identification of a party at a preliminary hearing is not a jurisdictional requirement; and (4) the county court erred and abused its discretion by not issuing a writ of mandamus prohibiting the clerk of the justice court from (a) improperly issuing writs of possession and (b) improperly refusing to send appeal documents to the county court. We reverse and remand.

STANDARD OF REVIEW
In reviewing the county court's judgment of dismissal for want of jurisdiction, we must affirm the dismissal if it was proper on any ground stated in the motion, even if it was granted on an improper ground. See Anthony v. Creech, 303 S.W.2d 414, 418 (Tex.Civ.App.Beaumont 1957, writ denied) (op. on reh'g) (citing predecessor to Tex.R.App.P. 81(b)(1) and Kelly v. Wright, 144 Tex. 114, 188 S.W.2d 983, 986 (1945)). Even though a trial court gives an incorrect reason for its judgment, this Court must affirm if the judgment may be upheld on any legal theory. See Jack v. Jack, 796 S.W.2d 543, 550 (Tex.App.Dallas 1990, no writ).

FACTS
Donald Austin brought a forcible entry and detainer action against Ms. Polk in the justice court. A judgment was entered against Ms. Polk. Following entry of the judgment, Ms. Polk attempted to perfect an appeal to the county court. The clerk of the justice court allegedly refused to file her pauper's affidavit in lieu of bond in the justice court so that she could appeal. She then commenced this action in the county court seeking: (1) a temporary injunction restraining Constable Braddock from directly or indirectly executing the writ of possession issued by the justice court until a final trial was held; (2) a permanent injunction[2] restraining Constable Bob Braddock from executing the writ of possession; and (3) a writ of mandamus to the clerk of the justice court, commanding the clerk to allow her to appeal[3] her forcible entry and detainer case to the county court.
The trial court granted Ms. Polk's application for a temporary restraining order and set a hearing on her application for temporary injunction for May 17, 1991. Following service of notice upon Constable Braddock, the district attorney filed, on his behalf, a motion to dissolve the temporary restraining order and motion to dismiss with a contest of Ms. Polk's Affidavit of Inability to Pay Costs For Person on Public Assistance (the Affidavit of Inability). There was only one ground stated for dismissal: that the action was frivolous or malicious.[4]
The district attorney also filed a plea in abatement on behalf of the clerk of the justice court alleging that: (1) the "clerk" is not a legal entity capable of being sued; and (2) the petition for writ of mandamus should specify the clerk by name because multiple persons hold the position of "clerk." These matters, together with Ms. Polk's application for temporary injunction, were heard on May 20, 1991. On the same day, the trial court entered its order dismissing Ms. Polk's case *80 for lack of jurisdiction and dissolving the temporary restraining order. The county court held that it had no jurisdiction because of the "plea in abatement and the TRO, too and the lack of bond." Ms. Polk appeals from the county court's dismissal.

PARTIES

1. Ms. Polk's Contention
In her third point of error, Ms. Polk contends that the county court erred in dismissing her request for relief for lack of jurisdiction because the complete identification of a party at a preliminary hearing is not a jurisdictional requirement.

2. Relevant Facts
The Clerk of the Justice Court, Precinct 5, filed a plea in abatement in the county court. In the plea in abatement, the clerk stated that it is not a legal entity capable of being sued as identified in the action. The clerk also pleaded that the State of Texas does not permit an officer to be sued in his or her official capacity merely by stating the officer's title. At the hearing on the motion to dismiss and on the plea in abatement, the district attorney argued for the first time that the proper party to be named was not the clerk of the justice court, but the justice of the peace himself. The district attorney argued that dismissal for lack of jurisdiction was, therefore, proper.

3. Applicable Law

a. The JP as a Proper Party
Rule 751 of the Texas Rules of Civil Procedure is as follows:

When an appeal has been perfected, the justice shall stay all further proceedings on the judgment, and immediately make out a transcript of all the entries made on his docket of the proceedings had in the case; and, he shall immediately file the same, together with the original papers and any money in the court registry, including sums tendered pursuant to Rule 749b(1), with the clerk of the county court of the county in which the trial was had, or other court having jurisdiction of such appeal. The clerk shall docket the cause, and the trial shall be de novo.
TEX.R.CIV.P. 751. This rule makes it clear that the proper party for a mandamus proceeding concerning the failure to file appeal papers with the county court in an appeal from the justice court under rule 751 is the justice of the peace. The trial court stated that one of the reasons he was dismissing for lack of jurisdiction was because of the plea in abatement.

b. Opportunity to Amend
If there is a defect in parties, there should be an opportunity to amend the petition to correct it against defects alleged in a plea in abatement. See Mercure Co., N.V. v. Rowland, 715 S.W.2d 677, 680 (Tex.App. Houston [1st Dist.] 1986, writ ref'd n.r.e.); Develo-Cepts, Inc. v. Galveston, 668 S.W.2d 790, 793 (Tex.App.Houston [14th Dist.] 1984, no writ).

4. Application of the Law to the Facts
The trial court did not give Ms. Polk a reasonable opportunity to correct any defect in her pleadings before dismissing her action for want of jurisdiction. However, we need not reverse regarding the trial court's dismissal for lack of jurisdiction if it was proper on any ground stated in the motion. Anthony, 303 S.W.2d at 418. The only ground stated in the motion to dismiss was that the case was frivolous. Ms. Polk had the right to appeal the justice court's ruling and to have the appeal documents sent to the county court. Her mandamus action was not frivolous. We hold that it was error to dismiss the case without affording Ms. Polk the opportunity to amend her pleadings. We sustain Ms. Polk's third point of error.

MANDAMUS
In her fourth point of error, Ms. Polk contends that the county court erred in failing to issue a mandamus prohibiting the clerk of the justice court from (a) improperly issuing writs of possession and (b) improperly refusing to send the transcript and other appeal documents to the county court.
There is nothing in the record before us to indicate that the clerk of the justice court *81 refused to send the transcript to the county court for appeal purposes. Because the county court did not hear evidence concerning the grounds for the writ, there is no evidence for this Court to consider. Because the alleged actions or inactions of the clerk of the justice court are not reflected in the record, we may not review this issue. See Garza v. Levin, 769 S.W.2d 644, 645 (Tex. App.Corpus Christi 1989, writ denied). We overrule Ms. Polk's fourth point of error. In light of our reversal on point of error three, we need not address points of error one and two.
We reverse the judgment of the trial court. We remand for proceedings consistent with this opinion. We order the county court to reinstate the mandamus action on its docket.
NOTES
[1]  All references to "the county court" are to County Court at Law Number 4, unless otherwise specified.
[2]  In her brief, Ms. Polk states that she was forced to move out and that, therefore, this injunction issue is moot.
[3]  In her brief, Ms. Polk states that, after this case was filed in the county court, the justice court filed her affidavit of inability. However, Ms. Polk states that the transcript and other appeal documents from the justice court have not been sent to the county court so that the appeal may proceed.
[4]  The parties do not address this ground on appeal.
