
426 S.E.2d 837 (1993)
COMMONWEALTH of Virginia
v.
Joe Douglas KILGORE.
Record No. 1588-92-3.
Court of Appeals of Virginia.
February 12, 1993.
Michael T. Judge, Asst. Atty. Gen. (Mary Sue Terry, Atty. Gen., on brief), for appellant.
Frederick W. Adkins, Norton (Patrick Cline, Cline, Adkins, Cline & Rogers, on brief), for appellee.
Present: BAKER, COLEMAN and BENTON, JJ.

OPINION
BAKER, Judge.
In this appeal by the Commonwealth from an order of the Circuit Court of Wise County (trial court), the sole issue presented is whether the trial court erred when it sustained the motion of Joe Douglas Kilgore (Kilgore) to suppress evidence of a tape recording of his conversation with two informants obtained through the combined efforts of Timothy McAfee (McAfee), Wise County Commonwealth Attorney, and David Mullins (Mullins), a Wise County deputy sheriff. Finding no error, we affirm the judgment of the trial court.
*838 We state the evidence in the light most favorable to the prevailing party in the trial court. On or about June 19, 1985, Richard Allen Jones was murdered in Wise County, apparently pursuant to a "killing for hire" scheme. Shortly thereafter, Kilgore learned that he was included among the police suspects being investigated. Although at that time Kilgore was not charged,[1] he sought the assistance and advice of the law firm of which McAfee was a member. At some time in 1987, prior to November 11, the Commonwealth received new evidence that Kilgore may have been involved in a scheme to murder Jones. In November 1987, McAfee was elected Commonwealth Attorney for Wise County for a term to begin January 1, 1988. Russell M. Large, the Commonwealth Attorney in office at the time, was informed that the new evidence being considered, if true, would be cause to prosecute Kilgore; however, as of November 12, 1987, the new information had not been confirmed. Because McAfee's law firm had been consulted by Kilgore while McAfee was a member, at the request of Large, the Circuit Court of Wise County entered the following order:
VIRGINIA:

IN THE CIRCUIT COURT OF WISE COUNTY

IN RE: DEATH OF RICK JONES

ORDER
Comes now the Commonwealth, by its Commonwealth's Attorney and moves the Court pursuant to Virginia Code Section 19.2-155 to appoint a competent attorney-at-law to represent the interest of the Commonwealth in the case involving the death of Rick Jones.
In support of this motion the Commonwealth avers that new evidence has been presented upon which a decision must be made as to whether or not to pursue this evidence; and further that the Commonwealth's Attorney-Elect has a conflict in that his law partner represented a potential suspect in the case; and further that the ends of justice require the Court to appoint a substitute to act in place of, and otherwise perform the duties and exercise the powers of, the Commonwealth Attorney in regard to the above case.
It is therefore, ADJUDGED, ORDERED and DECREED that Gerald Gray and Gregory Kallen, competent attorneys-at-law, is [sic] hereby appointed to perform the duties and exercise the power of the Commonwealth's Attorney in regard to the above case and such substitute Commonwealth's Attorney [sic] shall receive compensation and expenses as this Court deems reasonable, such compensation and expenses to be paid by the Commonwealth.
The Court further orders that this Order be sealed until further order of the Court.
Enter this Order this 12th day of November, 1987.
             s/ J. Robert Stump
             JUDGE
  REQUESTED:
  s/ Russell M. Large
  RUSSELL M. LARGE, COMMONWEALTH
  ATTORNEY
  SEEN:
  s/ Timothy McAfee
  TIMOTHY McAFEE, COMMONWEALTH'S
  ATTORNEY ELECT
Pursuant to that order, Gerald Gray and Gregory Kallen qualified as special prosecutors. They did not present an indictment against Kilgore until October 1990.
At all times relevant to this appeal, Mullins was the chief investigator for the Wise County Sheriff's Department. Notwithstanding that Danny Anderson had been convicted for Jones' murder, Mullins continued his investigation. In May 1990, "on a whim," Mullins called Donald Anderson (Danny's brother/informant) and was told that Kilgore had been involved in the murder. Mullins contacted McAfee, who in turn directed Mullins to have Ronald Anderson (Danny's other brother/informant) *839 contact him. Thereafter, Ronald Anderson, along with his attorney Berlin Skeen, met with McAfee in McAfee's office.[2] During that meeting, Skeen "worked out a deal" with McAfee and McAfee[3] gave Mullins "the go ahead" to talk with the informants. Mullins told Donald what McAfee had told him to say, which was to engage Kilgore in a conversation, to get him to talk about his involvement in the Jones murder, "[s]pecifically ... to talk about why he had had Rick Jones killed, how much money he paid and if there would be any other people involved in it." Mullins further provided Donald with a tape recorder supplied by McAfee. It is the tape recording procured by both Donald and Ronald, pursuant to those instructions, that is the subject of the suppression ordered by the trial court.
After the tape recording was made, Mullins advised McAfee that the tape recording part of the investigation was complete. Gray and Kallen had prepared an indictment and were "ready to present" it to the grand jury when McAfee "called off the grand jury." McAfee then telephoned his former partner, Mr. Hugh Cline, and asked that Mr. Cline and Kilgore agree that he could prosecute Kilgore. His request was refused. Kilgore was indicted October 15, 1990.
When Kilgore's counsel learned of the November 12, 1987 sealed order, he immediately filed motions to quash the indictment and/or suppress the tape-recorded evidence. Subsequent hearings on those motions revealed that Skeen had dealt with McAfee seeking immunity for Ronald Anderson if he cooperated. Skeen and Walt Rivers (Donald's attorney) testified that McAfee had granted immunity to Ronald Anderson. McAfee admitted discussing the matter with Skeen but denied that he had granted immunity.[4] Neither of the special prosecutors was involved in the discussions concerning immunity or the taping of the conversation with Kilgore.
At the conclusion of the hearings, arguments and review of the authorities, on July 29, 1992, the trial court made the following factual findings:
I. On November 12, 1987 the Circuit Court of Wise County entered an Order appointing Gerald Gray and Gregory Kallen as acting attorneys for the Commonwealth to act in the place and instead of the outgoing Commonwealth's Attorney, Marty Large, and the newly elected Commonwealth's Attorney, Timothy W. McAfee, in the case of the death of Rick Jones. A copy of that order is attached as Exhibit "A".
II. The reason the newly elected Commonwealth's Attorney, Mr. McAfee, was disqualified was because he was previously a member of the law firm of Cline, McAfee and Adkins, which after the murder of Rick Jones, in 1985, represented Joe Douglas Kilgore, who was a suspect at that time, and in 1987, when the Order was entered.
III. In May, 1990, as a result of investigation by Investigator David Mullins of the Wise County Sheriff's Department, in which Ronald Anderson and Donald Anderson were involved, Mullins contacted Mr. McAfee. Mr. McAfee directed Mr. Mullins to have Anderson contact him.
IV. Ronald Anderson retained attorney Berlin Skeen, who told Mr. McAfee that his client possibly had information about the involvement of Kilgore in the murder of Rick Jones, but that his client wanted a full grant of immunity before he would cooperate.
V. Mr. Skeen obtained a grant of immunity from Mr. McAfee, and Ronald Anderson subsequently gave a statement to Mullins, and he and his brother Donald Anderson agreed to wear a tape recorder, provided by Mr. McAfee, and to record incriminating statements from Kilgore.

*840 VI. After the recording of the defendant was made, Mr. McAfee did not listen to the recording, but called attorney Hugh Cline, a partner of Mr. McAfee's former firm, and advised Mr. Cline that Kilgore was under investigation for the capital murder of Rick Jones, and requested that Mr. Cline obtain Kilgore's consent to permit Mr. McAfee to prosecute him. Kilgore refused to consent.
VII. The Court believes that Mr. McAfee did not intentionally engage in misconduct.
XI. The decision to obtain a warrant and proceed with the case against Kilgore was made by Mr. Gray and Mr. Kallen.
The order also contained the following:
The Court is convinced that the tape recording of Kilgore was obtained in violation of his constitutional rights, specifically his 5th Amendment under the United States Constitution, and accordingly

ORDERS
that the tape recording of Kilgore be suppressed.
During an initial hearing on January 7, 1992, the trial court tentatively concluded that the motion to quash the indictment should be sustained. The acting Commonwealth's attorney then advised the trial court that the Commonwealth could not appeal an order quashing the indictment and made the following suggestion: "I think the suppression of evidence is what we can appeal and not the quashing of the indictment." The trial court responded:
Very well. I'll grant the motion to suppress the evidence then and allow the Commonwealth to reserve its right of appeal on that issue.
In response to that statement of the court, the acting Commonwealth's attorney made the following inquiry of the court:
Your honor also for our grounds to preserve our rights, is this being quashed under a due process 5th and 14th Amendment grounds?
The trial court responded: "Under due process" and directed the Commonwealth's attorney to prepare an order.
Nothing further was done until June 1992, when the Commonwealth moved the trial court "to reconsider its oral ruling rendered January 9 [sic], 1992...." For the first time, "self-incrimination" was injected in the hearings, and then only by the Commonwealth. The Commonwealth's motion included the following:
The Commonwealth moves for an order allowing the tape recording into evidence, or, in the alternative, a ruling specifically stating that the evidence is suppressed due to a violation of the defendant's constitutional rights under the search and seizure clause and/or a violation of the defendant's right against self-incrimination (emphasis added).
In support of that motion in June 1992, the trial court permitted the Commonwealth to present further evidence. At the conclusion of that hearing, the trial court twice announced that due process was the basis of its decision to suppress the tape evidence, "not the statutory." While agreeing that due process was an appropriate reason for the trial court's ruling, the prosecutors invited the trial court to commit the error the Commonwealth in this appeal now asserts as the reason we should reverse the order to suppress. During the June hearing, the prosecutor made the following statement to the trial court:
Your honor. The due process of rights we agree is what we're dealing with but it as I understand the Court's intent to admit the Commonwealth the right to appeal there must be a finding in the Court that the evidence supports the Court's conclusion that admission of this evidence would violate the defendant's right against self-incrimination.
After hearing further argument and reviewing additional authority, the trial court entered an order on July 29, 1992, endorsed by counsel for each party, in which the factual findings recited above were included, and suppressed the tape recording because it had been obtained in violation of Kilgore's constitutional rights guaranteed *841 by the Fifth Amendment to the United States Constitution.
Until a nunc pro tunc order was entered on September 3, 1992, an order that does not contain counsel's endorsement,[5] the trial court had never used the Fifth Amendment self-incrimination clause as the basis for its suppression order. The unendorsed nunc pro tunc order for the first time responded to the Commonwealth's invitation to commit the error the Commonwealth now urges that we use to reverse the trial court and permit the tape-recorded evidence to be used at Kilgore's trial.
The Commonwealth's brief and its oral argument before this Court addressed only the narrow issue of whether the trial court erred in suppressing the tape-recorded conversation between Kilgore and the informants. In advancing that argument, the Commonwealth urges that we reverse the nunc pro tunc order in which the trial court "concluded that the tape recording of Kilgore was obtained in violation of his constitutional rights, specifically his 5th Amendment rights against self-incrimination under the United States Constitution," and that we direct that the tape be admitted at appellant's trial. If we were limited only to an examination of the nunc pro tunc order entered on September 3, 1992, we might find that the trial court so concluded. However, we are required to review the entire record. That review clearly discloses that, contrary to the reason expressed in the nunc pro tunc order, the words "rights against self-incrimination" were inserted at the request of the Commonwealth to enable the Commonwealth to appeal the trial court's decision. Having invited the trial court to insert self-incrimination in its nunc pro tunc order, the Commonwealth argues that the trial court should be reversed because the court granted the Commonwealth's request.

Invited Error
At the initial stages of the hearings on Kilgore's motions to quash and/or suppress the taped evidence, the trial court expressed an intent to quash the indictment. The Commonwealth asserted that it could not appeal that finding and moved the trial court to order that the taped evidence be suppressed for reasons of due process violation. The trial court acceded to that request and instructed the acting Commonwealth's attorney to draw the appropriate order. Thereafter, when the Commonwealth concluded, rightly or wrongly, that it could only appeal if the order contained the "self-incrimination" phrase, the trial court continued to state that its reason for suppression was: "Due process, not statutory." When its July 29, 1992 order was entered, counsel of both parties endorsed it. That order did not refer to "self-incrimination." On September 3, 1992, without notice to Kilgore, the trial court further acceded to the Commonwealth's request to include "self-incrimination" in its order. On this appeal, the Commonwealth asserts that the sole error committed by the trial court was including the phrase it had invited the trial court to include, and asks us to find that the order it requested be declared null and void so that the tape-recorded evidence can be used at Kilgore's trial.
In a series of cases beginning with Carpenter v. Utz, 45 Va. (4 Gratt.) 270 (1848), the Supreme Court of Virginia has held that appellate courts in this state will not permit an appellant to use as a ground for reversal the trial court error that the appellant invited. See e.g., Edmiston Homes Ltd. v. The McKinney Group, 241 Va. 263, 401 S.E.2d 875 (1991); Saunders v. Commonwealth, 211 Va. 399, 177 S.E.2d 637 (1970); Clark v. Commonwealth, 202 Va. 787, 120 S.E.2d 270 (1961); Godsey v. Tucker, 196 Va. 469, 84 S.E.2d 435 (1954); Hundley v. Commonwealth, 193 Va. 449, 454, 69 S.E.2d 336, 339 (1952). Those cases variously applied the doctrine of invited error to either party in civil cases and to defendants appealing their convictions. There is no reason to exempt the Commonwealth from the doctrine when it exercises its right of appeal. Because the record *842 shows that the error of which the Commonwealth complains on this appeal was introduced or invited by the Commonwealth, we do not consider whether the suppression contained in the nunc pro tunc order should be reversed. See Raisovich v. Giddings, 214 Va. 485, 488, 201 S.E.2d 606, 608 (1974).

Due Process
Although we decline to consider the selfincrimination question, we will address the question certified to us by the panel that granted this appeal, to-wit: Did the trial court err in suppressing the tape-recorded conversation between Kilgore and Ronald and Donald Anderson? For the reasons that follow, we hold that the trial court did not err in finding that the tape-recorded evidence should be suppressed.
"Attorneys for the Commonwealth `should always remember whose commission they bear and should scrupulously respect the rights of the accused.'" Compton v. Commonwealth, 190 Va. 48, 57, 55 S.E.2d 446, 450 (1949) (citation omitted); see also Harrison v. Commonwealth, 183 Va. 394, 402, 32 S.E.2d 136, 140 (1944). "Both [the] court and counsel should not forget that the object sought is a fair trial... in keeping with our high traditions of justice. All that endangers that result should be avoided." Compton, 190 Va. at 56, 55 S.E.2d at 450. "The attorney for the Commonwealth is not only under the duty to prosecute one accused of crime, but it is also his [or her] duty to see that an accused is accorded a fair trial." Taylor v. Commonwealth, 180 Va. 413, 420, 23 S.E.2d 139, 142 (1942). "[Thus, w]hile the laws of [this Commonwealth] vest in this [Commonwealth's attorney] wide authority in [initiating] prosecutions, such authority carries with it a commensurate responsibility." Macon v. Commonwealth, 187 Va. 363, 373, 46 S.E.2d 396, 401 (1948). Under our system of justice, in any prosecution, every person accused of crime, whether guilty or innocent, is entitled to have all his or her legal rights protected, and the Commonwealth's attorney, as the representative of the people, should guard against any violation of the accused's rights. Harris v. Commonwealth, 133 Va. 700, 708, 112 S.E. 753, 755 (1922). Nothing should be done or permitted to prejudice the case of the accused. McLane v. Commonwealth, 202 Va. 197, 205, 116 S.E.2d 274, 281 (1960).
In Cantrell v. Commonwealth, 229 Va. 387, 329 S.E.2d 22 (1985), our Supreme Court reversed Cantrell's conviction when it was shown that a private attorney, acting as special Commonwealth's attorney, led the prosecution of Cantrell after he had been retained to institute a civil action against Cantrell arising out of the same facts. The Court held this to be a conflict of interest which, under long-standing fair trial requirements, was cause for reversal because the prosecutor cannot serve two masters and administer the law impartially as the Commonwealth's attorney is expected to do.
Although the facts in Cantrell differ from those before us, and we find no Virginia case directly on point, as noted above, "[the Supreme Court of Virginia] has [on] numerous occasions been called upon to comment on the unwarranted conduct of the representatives of the Commonwealth in criminal cases." Bateman v. Commonwealth, 183 Va. 253, 256, 32 S.E.2d 134, 136 (1944). In the case before us, the record discloses that in November 1987, the court held that McAfee had a conflict of interest and entered an order prohibiting McAfee from participating in the decision-making pretrial process, as well as the prosecution. Although the specific issue we must decide has not been reviewed by a Virginia appellate court, it has been presented to other courts, all of which have found that where a prosecutor previously has represented a defendant it is reversible error for that attorney to assist in a later prosecution of a former client on a matter for which the attorney-client relationship had been established. These reversals have been based upon a violation of the defendant's right to due process guaranteed by the United States Constitution. See Turbin v. Superior Court, 165 Ariz. 195, 797 P.2d 734 (1990); Satterwhite v. State, 359 So.2d 816 (Ala.Crim.App.), remanded, 359 So.2d 819 (Ala.), on remand, 359 So.2d 821 (Ala. *843 Crim.App.1977), writ quashed, 359 So.2d 821 (Ala.1978); Mattress v. State, 564 S.W.2d 678 (Tenn.Crim.App.1977); State v. Britton, 157 W.Va. 711, 203 S.E.2d 462 (1974); Corbin v. Broadman, 6 Ariz.App. 436, 433 P.2d 289 (1967); Young v. State, 177 So.2d 345 (Fla.Dist.Ct.App.1965); State v. Burns, 322 S.W.2d 736 (Mo.1959); State v. Leigh, 178 Kan. 549, 289 P.2d 774 (1955).
In United States v. Schell, 775 F.2d 559 (4th Cir.1985), cert. denied, 475 U.S. 1098, 106 S.Ct. 1498, 89 L.Ed.2d 898 (1986), the Fourth Circuit Court of Appeals agreed that a due process violation occurs when, subsequent to the establishment of an attorney-client relationship, the attorney participates in the prosecution of his former client. The Court held:
The relationship between an attorney and his client is a sacred one. In that relationship, the client must be secure in the knowledge that any information he reveals to counsel will remain confidential. The confidentiality of the attorney-client relationship is severely compromised, if not destroyed, when, after representing a client, a lawyer joins in the criminal prosecution of that client with respect to the identical matter about which the attorney originally counseled the client. Such switching of sides is fundamentally unfair and inherently prejudicial. Without question, the client's right to a fair trial, secured by the due process clauses of the fifth and fourteenth amendments, is compromised under these circumstances.
Id. at 565. In addition, merely being a former member of a firm in which a partner represented the accused disqualifies the prosecuting attorney, even if he or she did not assist the partner in the accused's case. See State v. Detroit Motors, 62 N.J.Super. 386, 163 A.2d 227 (1960).

Merit Decisions
This is not the first case to come before us in which a trial court appears to have lost sight of its duty to decide the issue without regard to whether the defendant or the Commonwealth has the right to appeal. When the trial court fashioned its order not based on its expressed view as to the merits, but only to enable the Commonwealth to appeal, Kilgore was deprived of a right that other defendants might enjoy, that is, to have the suppression issue end with the trial court's opinion. Trial courts must resolve issues according to the evidence, without regard to the right of either party to appeal.
When a trial court makes the correct decision, it will be upheld even though the wrong reason for the decision was stated at the time the opinion was rendered. See First Va. Bank v. Commonwealth, 213 Va. 349, 351, 193 S.E.2d 4, 6 (1972); Twardy v. Twardy, 14 Va.App. 651, 657, 419 S.E.2d 848, 851-52 (1992); Driscoll v. Commonwealth, 14 Va.App. 449, 451-52, 417 S.E.2d 312, 313 (1992). In the case before us, there can be no doubt that the factual findings made by the trial court support an order to suppress the tape-recorded evidence because Kilgore's due process rights were violated. If the evidence had been admitted at trial, and Kilgore had been convicted, we would have set the conviction aside because a denial of a constitutional right is of itself reversible error. See Pine v. Commonwealth, 121 Va. 812, 837, 93 S.E. 652, 660 (1917).
For the reasons stated, the judgment of the trial court suppressing the tape recorded conversation is affirmed.
AFFIRMED.
NOTES
[1]  Kilgore was not indicted as a participant in Jones' murder until October 1990.
[2]  McAfee officially became the Wise County Commonwealth Attorney on January 1, 1988.
[3]  Gray and Kallen were not involved in this "deal."
[4]  The evidence supports the trial court's finding that immunity was granted.
[5]  The appendix filed with this Court discloses that neither counsel endorsed the nunc pro tunc order, and there is nothing to show that Kilgore was given notice that that order was to be entered. The July 29, 1992 order contained the endorsement of counsel.
