
660 P.2d 20 (1982)
Charles GARLAND and Elaine Garland, Plaintiffs-Appellants,
v.
BOARD OF COUNTY COMMISSIONERS, LARIMER COUNTY, State of Colorado, Defendant-Appellee.
No. 81CA1114.
Colorado Court of Appeals, Div. I.
December 2, 1982.
Rehearing Denied December 23, 1982.
*21 Fischer & Wilmarth, Steven G. Francis, Fort Collins, for plaintiffs-appellants.
Harden, Schmidt & Hass, P.C., George H. Hass, Fort Collins, for defendant-appellee.
ENOCH, Chief Judge.
Plaintiffs, Charles and Elaine Garland, appeal a judgment of the trial court affirming the determination of the defendant, Board of County Commissioners for Larimer County (the Board), denying the Garlands' application for a special use permit to operate a greyhound kennel on their property. We affirm in part and reverse in part.
The Garlands are owners of a three-acre parcel of real property in Larimer County. The area in which the Garlands' property is located is zoned FO-Forestry. That zoning designation includes two categories of uses, the first being "Uses Permitted," such as farming and residential, and the second being "Uses Permitted by Special Review," including, among other uses, "kennels."
The Garlands began raising greyhounds on their property in the mid 1970's. In 1978, at a time when the Garlands had approximately twenty greyhounds on their property, they were notified by county authorities that the kennel was not a permitted use, that they were in violation of the applicable zoning regulations, and that, in order to maintain their operation, they would have to seek approval of the county through the special review procedures provided for in the "Comprehensive Zoning Plan of Larimer County."
*22 Subsequently, the Garlands applied for a special review hearing, and, on September 27, 1978, the matter was presented to the Board at a public hearing. The testimony of various property owners in the area was taken, including the testimony of Mr. Garland. The Board denied the Garlands' application for permission to operate the kennel, finding that the property was too small for a use with the intensity of a breeding kennel, that the noise from the kennel adversely affected surrounding properties, and that the use was detrimental to nearby residential properties.
The Garlands sought review of the Board's decision in the district court, in accordance with C.R.C.P. 106(a)(4). The Board counterclaimed for an injunction to prohibit the Garlands' continued use of the property in alleged violation of the zoning regulations, and to require the Garlands to remove all improvements and chattels relating to the operation of the kennel. The Garlands filed a reply to the Board's counterclaim, setting forth various affirmative defenses, including the claim of a valid non-conforming use, estoppel, and the unconstitutionality of the Board's decision as applied to the Garlands.
In its order of August 14, 1980, the trial court concluded that:
"Based upon a lack of relevant findings by the Larimer County Commissioners, the court cannot determine upon what basis the decision to deny plaintiffs their use of real property for greyhound breeding purposes was made. Such a lack of findings causes the court to determine that, without more, the action of the Larimer County Commissioners was arbitrary and capricious."
The court further concluded that the Garlands' affirmative defenses to the Board's counterclaim for an injunction "should have been considered by the Larimer County Commissioners in their findings," and therefore, the court remanded the case to the Board for it to make "more complete and relevant findings."
At the second hearing, the Board specifically considered the issues presented by the court on remand. The Board took further testimony and concluded that the Garlands had not shown a prior non-conforming use, that no estoppel had been shown, that the term "kennel" refers to a facility for dogs, and that the Garlands' application to operate a kennel should be denied.
The Garlands challenged the decision of the Board resulting from the second hearing by the refiling of an amended petition in the original C.R.C.P. 106 proceeding. At the court hearing on this amended petition, on September 10, 1981, the court affirmed the Board's ruling and denied the Garland's request for relief under C.R.C.P. 106. The court also denied the Garlands' request to present evidence on their affirmative defenses, holding that these issues were "adequately covered (by the board) and bear an obligation of denial of their petition and injunction [sic] of discriminatory zoning, constitutional questions, and other matters. There is nothing to indicate the validity of said issue."
Subsequently, in its findings of fact and conclusions of law, on September 28, 1981, nunc pro tunc to September 10, 1981, the trial court held, inter alia, that the evidence with respect to the Garlands' affirmative defenses "is sufficient to support the decision of the Board of County Commissioners whether such evidence is viewed as an appellate matter or viewed by this court sitting as the trier of fact." The Garlands now allege error in the oral ruling of the trial court on September 10, 1981, and in the written order of the court of September 28, 1981.

I.
The Garlands first contend that the trial court erred in remanding to the Board the issues raised in their affirmative defenses, and in subsequently reviewing the Board's determination of those issues in the context of a C.R.C.P. 106 proceeding. We agree that this was error. However, as will be explained below, the trial court ultimately reached the correct result concerning the C.R.C.P. 106 proceeding.
*23 The purpose of an action brought under C.R.C.P. 106(a)(4) is to determine if an inferior tribunal, exercising judicial or quasi-judicial functions, has exceeded its jurisdiction or abused its discretion. City of Colorado Springs v. District Court, 184 Colo. 177, 519 P.2d 325 (1974). In such a proceeding, the reviewing court is to "ascertain from the record of the lower tribunal alone whether the inferior tribunal regularly pursued its authority," Johnston v. City Council, 177 Colo. 223, 493 P.2d 651 (1972) (emphasis supplied), and a district court may not, on its own motion, order a remand to supplement the record where the evidence has been presented on all issues necessary for a determination of the validity of the action taken. Cline v. City of Boulder, 35 Colo.App. 349, 532 P.2d 770 (1975).
Here, the trial court found that at the first Board hearing there was a lack of relevant findings by the Board which prevented the trial court from determining the basis for the Board's decision, and, therefore, the court concluded that the Board's actions were arbitrary and capricious. The fact that the trial court then remanded the case to the Board for specific findings concerning the Garlands' affirmative defenses indicates that the trial court in part based its ruling in the original C.R.C.P. 106 proceeding upon the failure of the Board to make adequate findings concerning the Garlands' affirmative defenses, issues which are distinct from and should be considered separately from the C.R.C.P. 106 proceeding itself. In so doing, the trial court erred.
The trial court should have ruled on the Garlands' petition based only upon the record of the Board at the first hearing. Hazelwood v. Saul, 619 P.2d 499 (Colo.1980); Norby v. City of Boulder, 195 Colo. 231, 577 P.2d 277 (1978). The record discloses that there was competent evidence at the first hearing to support the findings of the Board, Dillon Companies, Inc. v. City of Boulder, 183 Colo. 117, 515 P.2d 627 (1973); Bauer v. Wheat Ridge, 182 Colo. 324, 513 P.2d 203 (1973), and therefore, the trial court should have affirmed the Board's decision at that hearing and denied the Garland's original C.R.C.P. 106 petition for relief. However, since the trial court ultimately entered the correct judgment by denying the Garland's amended petition, we affirm the trial court's judgment as to that petition, even though it was entered for the wrong reason. Lampley v. Celebrity Homes, Inc., 42 Colo.App. 359, 594 P.2d 605 (1979); Klipfel v. Neill, 30 Colo.App. 428, 494 P.2d 115 (1972).

II.
We also agree with the Garlands' contention that the trial court erred in refusing to consider their affirmative defenses as legal issues separate from the C.R.C.P. 106 proceeding and in refusing to hold a hearing to receive evidence on those issues.
The issues were presented as affirmative defenses to the Board's counterclaim for an injunction under § 30-28-124(2), C.R.S.1973 (1982 Cum.Supp.). Section 30-28-124(1), C.R.S.1973 (1982 Cum.Supp.) provides that the violation of a zoning regulation is a misdemeanor, and subsection 2 sets out various remedies which the county may employ in the event of such a violation. One of those remedies is injunctive relief.
When considering the Board's request for an injunction and the Garlands' affirmative defenses to that request, unlike the C.R.C.P. 106 proceeding, the district court sat as a trial court, not a reviewing court, and therefore the trial court, not the Board, had the responsibility for determining the legal merit of those affirmative defenses. In remanding those issues for fact-finding by the Board at its second hearing, and then applying the standard concerning the burden of proof and scope of review appropriate for an action under C.R.C.P. 106 to those issues at a hearing on the amended C.R.C.P. 106 petition when those matters were outside the ambit of such a proceeding, the trial court, in effect, prevented the Garlands from litigating those issues fully in the trial court, and it placed the Board in the position of having to consider matters not within its jurisdiction. The Garlands have a right to their day in court as to these issues, and it was error for the trial court to *24 refuse them an opportunity to present evidence in support of their contentions. See Morris v. Board of County Commissioners, 150 Colo. 33, 370 P.2d 438 (1962).
Because of our disposition of these issues, it is unnecessary to consider the Garlands' other contentions.
Accordingly, the judgment of the trial court as to the amended petition is affirmed insofar as it affirmed the Board's denial of the special use permit, and is reversed as to its refusal to consider the issues pertaining to injunctive relief and affirmative defenses thereto. The cause is remanded with directions to the trial court to conduct a hearing on the issues of injunctive relief and the Garlands' affirmative defenses thereto, allowing all parties a full opportunity to present any evidence that they may have in support of their respective positions, to make such findings as are necessary, and thereupon to enter an appropriate judgment.
PIERCE and KELLY, JJ., concur.
