The question before us is whether a lawyer who had represented a defendant in a criminal case committed contempt of court when she refused to disclose the dates on which she conferred with her former client.
The lawyer, Nan Waller, was appointed in October 1985 to represent Charles Keenan, who was suspected of murdering Scott Webb. Waller informed the prosecutor and police that she represented Keenan, that he did not wish to talk with them, and that future communications should be with her. Keenan was not charged, and active investigation of the murder eventually ceased.
Keenan later was prosecuted on another murder charge, on which he was represented by a different lawyer. After he was convicted on that charge, Keenan in October 1986 wrote to a Portland police detective about the Webb murder. The detective interviewed Keenan in prison, and Keenan eventually confessed to that murder. He repeated his confession in a letter to the prosecuting attorney and in further interviews with police officers. Waller was not told of the interviews.
Keenan was indicted, and a new attorney, Brad Grove, was appointed to represent him. Grove moved to suppress Keenan’s confession on grounds that it had been improperly obtained in violation of the rights asserted in Waller’s letter.
At the suppression hearing, Waller testified that she had written the letter and that she still represented Keenan in the Webb investigation at the time of his confession. During cross-examination, the prosecutor asked her to specify the dates of her conversations with Keenan. Defense counsel objected, asserting Keenan’s attorney-client privilege and violation of a lawyer’s obligation to keep a client’s secrets. The trial court overruled the objections and ordered Waller to disclose the dates, although not the substance of the conversations. When Waller persisted in refusing to disclose the dates of her conversations with Keenan or whether they extended into October, November or December of 1986 (the time of Keenan’s confessions), the court adjudged her in contempt. *518The Court of Appeals affirmed the judgment. State v. Keenan/Waller, 91 Or App 481, 756 P2d 51 (1988).
After the affirmance by the Court of Appeals, Waller answered the questions as ordered, purging the contempt. The state therefore argues that further review of the order is moot. We agree with the state that the judgment is one of civil, not criminal, contempt. See In the Matter of Virginia Hanks, 290 Or 451, 623 P2d 623 (1981). If the trial court had vacated the judgment of contempt after Waller complied with the court’s order, the appeal would be moot. But the trial court did not vacate the judgment, because it was before this court on review. Even without imposition or enforcement of a sanction, an outstanding judgment that a lawyer has committed contempt of court can have future legal consequences for the lawyer, for instance in subsequent disciplinary proceedings in some unrelated matter. If the contemnor had no practical opportunity to challenge the court’s order before complying or refusing to comply, and the order was erroneous, the judgment of contempt should be set aside. Cf. State v. Crenshaw, 307 Or 160, 764 P2d 1372 (1988). We therefore do not dismiss the appeal on procedural grounds.
The obligations on which Waller based her refusal to answer are of two kinds. One is the evidentiary attorney-client privilege, OEC 503, which provides:
“(1) As used in this section, unless the context requires otherwise:
<<* * * * *
“(b) ‘Confidential communication’ means a communication not intended to be disclosed to third persons other than those to whom disclosure is in furtherance of the rendition of professional legal services to the client or those reasonably necessary for the transmission of the communication.
<<* * * * *
“(2) A client has a privilege to refuse to disclose and to prevent any other person from disclosing confidential communications made for the purpose of facilitating the rendition of professional legal services to the client:
“(a) Between the client or the client’s representative and the client’s lawyer or a representative of the lawyer.”
*519The second is the obligation to maintain a client’s secrets that is recognized in ORS 9.460(5) and in Canon 4 of the Code of Professional Responsibility, further defined in DR 4-101 (A).1 The provisions are not coextensive. The professional obligation to “preserve” the client’s secrets “at every peril to the attorney,” ORS 9.460(5), first codified in Oregon’s Deady Code of 1865 following the Field Codes of New York and California, is not limited to the attorney’s position as a witness. Canon 4, as DR 4-101(A) spells out, does not confine the client’s “secrets” to communications; indeed, they may reach the attorney from someone other than the client. The Model Rules of Professional Conduct proposed by the American Bar Association in 1983 would forbid a lawyer to “reveal information relating to representation of a client,” which the commentary explains as including “all information relating to the representation, whatever its source.” Model Rules of Professional Conduct, Rule 1.6, comment (1987). See also Wolfram, Modern Legal Ethics 297-8 (1986). However this broad rule might be applied to various problems, the fact that it reflected a majority’s rejection of more qualified recommendations of the ABA’s Kutak Commission2 shows that one cannot dismiss a literal reading of statutes like ORS 9.460(5) as unthinkable.
To hold that, except for the rules of evidentiary privilege, the general obligation to testify overrides an attorney’s professional obligation of secrecy would be too facile where, as in Oregon, the professional obligation is statutory law. The *520statute would, of course, yield to an accused’s constitutional right to the lawyer’s testimony.3 In other cases, if the lawyer is under subpoena, the two demands on the lawyer call for harmonizing ORS 9.460(5) with conflicting statutes as far as possible.4 See ORS 136.555 et seq; ORCP 55; ORS 1.010 and 1.020. Few decisions give independent attention to the statutory obligation to preserve “secrets” beyond the evidentiary privilege for confidential communications; for instance, decisions requiring lawyers to produce physical evidence do not refer to such statutes. See, e.g., People v. Meredith, 29 Cal 3d 682, 175 Cal Rptr 612, 631 P2d 46 (1981).
In cases that distinguish secrets from confidential communications, the Washington Supreme Court has held that information how a client paid his lawyer, though not a “confidence,” was a “secret” that only could be disclosed under the exception for court orders, which also appears in DR 4-101(C)(2) but not in ORS 9.460.5 Seventh Elect Church in Israel v. Rogers, 102 Wash 2d 527, 688 P2d 506, 510-11 (1984) (construing DR 4-101 of the Code of Professional Responsibility). A New Jersey opinion, on the other hand, protected the identity of mentally disabled clients as a “secret,” though it was not confidential under the evidentiary privilege. In re Advisory Opinion No. 544 of New Jersey, 103 NJ 399, 511 A2d 609, 612-13 (1986). This court, in an early case, treated the section of the code that states an unqualified obligation to preserve secrets and the section recognizing the evidentiary privilege for confidential communications as “simply declaratory of the common law” without referring to the difference between the sections. State ex rel Hardy v. Gleason, 19 Or 159, *521162 (1890).6 An argument that the unqualified rule of ORS 9.460(5) is superseded by the more recent Canon 4 and the exception in DR 4-101(C)(2) fails because ORS 9.460(5) is a statute and the disciplinary rules have only the status of regulations under delegated authority, ORS 9.490.7
This is not the case to resolve possible differences between the evidentiary privilege and ORS 9.460(5). Here the client, Keenan, himself called Waller as a witness to establish that she was appointed to be his lawyer in the Webb murder investigation and that the appointment had not been rescinded. She also testified that she did not terminate her representation of Keenan and had no reason to think that she was not representing him until the appointment of Grove at Keenan’s arraignment. The questions asked on cross-examination to which Keenan objected and that Waller refused to answer concerned the duration and scope of her representation of Keenan. The circuit judge stated:
“THE COURT: * * * [T]here seem to be two issues here. One is: Was Miss Waller Mr. Keenan’s attorney at that point. And second, what was the scope of her representation. Did she — The defense’s position is that, as I understand it to be, that all of the contacts that various law enforcement people made with the defendant should be suppressed because there was an assertion of the right to remain silent and right to counsel. Isn’t that your position?
“MR. GROVE: That’s my position, yes.
“THE COURT: Then isn’t it relevant to inquire as to what was the scope of that representation so that — In other *522words, the mere fact that there was an order of appointment wouldn’t necessarily mean that an attorney did, in fact, go on and perform, act in that capacity, or that at the time they purported to act on behalf of her client that she had authority to do so * * *.”
The circuit court ruled that the state could cross-examine Waller concerning the dates, although not the content, of her contacts with Keenan in order to question the time and scope of Waller’s authority to act as Keenan’s lawyer. The court rejected Keenan’s objections to relevance of the questions because they related to Waller’s own testimony concerning her representation of Keenan and to the duration of her assertion of rights on his behalf. The court’s carefully circumscribed ruling on relevancy was well within the limits of OEC 401.
The main dispute concerns whether the dates of communications between Waller and Keenan were privileged information because their disclosure would amount to disclosure of their substance. We assume that the privilege could shield information beyond communications, such as the identity of the client, if disclosure would have that effect. See Cole v. Johnson, 103 Or 319, 333, 205 P 282 (1922), and cases cited in Annot., 16 ALR 3d 1047 (1967); Annot., 84 ALR Fed 852 (1987). Waller maintains that the purpose of the questions to her was to obtain the dates of attorney-client communications in order to prove their contents. She quotes a statement of the prosecutor to show that he meant to use the dates to infer “whether or not the defendant, in fact, knowing he was represented by an attorney chose to waive that representation and voluntarily contact the police.”
Whatever the prosecutor might have attempted to make of the dates if Waller had given them, there is nothing in this record to suggest that the trial court would have allowed it. This was not a trial on the merits either before a jury or before the court. It was a hearing on defendant’s motion to suppress his statements to police officers, and the trial court might well deem the question of Waller’s continuing representation relevant either to one or to the other basis for the motion, interference with counsel’s representation or the volunteered character of the defendant’s statements. The trial court carefully defined the scope of the issue:
*523“[T]his scenario is possible, that Miss Waller was appointed on October 18th, that she had some consultation with Mr. Keenan until some time after she wrote the letter in December, and never communicated with him or heard from him, or thought about this again from there on. Submitted a request for payment of attorney fees, got paid, and that was the end of it. I don’t know. I don’t know what the evidence is, but if those were the facts, that certainly might be a relevant consideration for the Court which must then determine for purposes of these motions, or by preponderance, whether there still was or was not an attorney/client relationship; whether there was or was not a waiver of any privilege by Mr. Keenan; whether, in fact, any privilege existed at that point, et cetera. I don’t know what is going to be developed here. That’s what I see is the issue.”
The court believed that an attorney appointed to represent a client before any charge is filed need not, as a matter of law, be assumed to represent a client indefinitely, but that this was a factual question and subject to the court’s examination to the extent that the fact was relevant to a decision. The trial court made clear that it would not allow questions to go further:
“Well, my ruling is that the State may inquire for purposes of this motion only as to the presence or absence of contact. It’s only going to one issue and that is whether Miss Waller was representing the defendant at various points in time. That’s the only issue we have got today to deal with. So none of this is going any further than this motion. But the defendant — Or excuse me, the State may inquire as to whether there were contacts and the dates of those contacts and no more for now.”
This ruling correctly confined the issue. One can imagine situations in which it would be improper to probe the frequency and dates of a client’s contacts with an attorney, but when the client relies on the fact that he was represented by an attorney and calls the attorney as a witness, and the fact is disputed, the witness may be examined so far as necessary to decide that issue. Because the court’s order was not in error, neither was the judgment of contempt.
The decision of the Court of Appeals, affirming the judgment of the circuit court, is affirmed.
ORS 9.460(5) provides:
“An attorney shall:
<<* * * * *
“(5) Maintain inviolate the confidence, and at every peril to the attorney, preserve the secrets of the clients of the attorney!.]”
Canon 4 of the Code of Professional Responsibility provides:
“A lawyer should preserve the confidences and secrets of a client.”
DR 4-101(A) provides:
“ ‘Confidence’ refers to information protected by the attorney-client privilege under applicable law, and ‘secret’ refers to other information gained in a current or former professional relationship that the client has requested be held inviolate or the disclosure of which would be embarrassing or would be likely to be detrimental to the client.”
See Freedman, Lawyer-Client Confidences: The Model Rules’ Radical Assault on Tradition, 48 ABA J 428 (1982); Clark, Fear and Loathing in New Orleans: The Sorry Fate of the Kutak Commission’s Rules, 17 Suffolk U L Rev 79, 84-88 (1983).
Article I, section 11, of the Oregon Constitution provides:
“In all criminal prosecutions, the accused shall have the right * * * to meet the witnesses face to face, and to have compulsory process for obtaining witnesses in his favor * *
Waller’s reliance on Canon 4 and DR 4-101(A), as distinct from ORS 9.460(5), fails because DR 4-101(C) expressly exempts disclosure of client secrets when “required by law or court order,” as occurred in this case.
DR 4-101(C)(2) provides:
“A lawyer may reveal:
“(2) Confidences or secrets when permitted by a Disciplinary Rule or required by law or court order * * *.”
In 1890, the obligation to protect client secrets provided as follows:
“It is the duty of an attorney * * *
“5. To maintain inviolate the confidence, and at every peril to himself to preserve the secrets, of his clients * *
Hill’s Annotated Laws of Oregon § 1038 (1887). The evidentiary privilege provided:
“An attorney shall not, without the consent of his client, be examined as to any communication made by the client to him, or his advice given thereon, in the course of professional employment.”
Hill’s Annotated Laws of Oregon § 712(2) (1887).
ORS 9.490 provides:
“The board of governors, with the approval of the state bar given at any regular or special meeting, shall formulate rules of professional conduct, and when such rules are adopted by the Supreme Court, shall have power to enforce the same. Such rules shall be binding upon all members of the bar.”