
10 Ill. App.2d 39 (1956)
134 N.E.2d 32
Samuel R. Cheevers, Appellant,
v.
Harry Stone, and Roger Lumber Company, Appellees.
Gen. No. 46,766.
Illinois Appellate Court  First District, Second Division.
April 24, 1956.
Released for publication May 15, 1956.
*40 *41 Geter & Geter, of Chicago, for appellant; Howard D. Geter Jr., and Antoine L. Joseph, both of Chicago, of counsel.
Maurice Weissman, of Chicago, for appellees.
JUDGE SCHWARTZ delivered the opinion of the court.
This is an appeal from an order of the Municipal Court striking plaintiff's statement of claim and dismissing the suit.
The statement of claim contained three counts. The first count states a claim against defendant Harry Stone for compensation in the sum of $1,500 arising out of a contract between them relative to the construction of a public garage. Count two states a claim against the same defendant for $1,500, being the reasonable value of services rendered in the construction of the public garage. The third count states a claim against defendant Roger Lumber Company for $1,500, being the reasonable value of services rendered "at the special instance and request of Defendant, Roger Lumber Company, a Corporation ... for Defendant as a contractor."
The written contract between plaintiff and defendant Stone contained promises by plaintiff to do the following: "Item 1  To furnish the proper legal process to have the property rezoned from residential to commercial use. Item 2  To accelerate the date of public hearing and personally represent my client at the hearing. Item 3  To use the necessary political pressure to obtain the authorization for a legal permit to *42 build without delay of the lengthy and regular process of rezoning procedure." The balance of the contract was vague, but we gather that plaintiff further promised to estimate the cost of construction and to procure vital materials. Plaintiff's fee for these services was to be $1,500. Plaintiff was not and is not now an attorney.
Defendants answered the complaint with a statement of defense based upon a plea of res judicata. This statement set forth a prior bill in equity to foreclose a mechanic's lien entitled Cheevers v. Stone, 53 C 13460, filed in the Circuit Court of Cook County, and alleged that said proceeding was based upon the same written contract that forms the basis of plaintiff's action in the present proceeding. The statement of defense further alleged that defendants filed a motion to dismiss the bill in equity on the following grounds:
"(a) That items numbered (1) and (2) in plaintiff's complaint cannot properly be made the subject matter of a claim for lien in that it appears that said services are of a legal character and constitute the practice of law; that plaintiff does not allege he is duly licensed as such; that the court will not lend its aid in the enforcement of a contract contrary to law;
"(b) That the enforcement of the contract dated January 6, 1951, is contrary to public policy in that the contract contemplates the use of political pressure and is of a character contrary to the law and constitutes a form of undertaking to which courts will not aid in enforcement."
The statement of defense further states that the Circuit Court granted said motion to dismiss and entered the following order:
"(1) That the Court finds that said motion to strike the complaint of plaintiff is well founded and said motion is accordingly sustained, and it appearing to the Court that the plaintiff stands by said complaint and does not wish to plead over;
*43 "(2) It is accordingly ordered, adjudged and decreed that said complaint be stricken for want of equity, and suit of plaintiff is accordingly dismissed."
The statement of defense concludes that the order of the Circuit Court in the action to foreclose the lien was an adjudication that the contract was illegal and unenforceable, and that said adjudication is determinative of the present proceeding. Defendants moved to dismiss the complaint.
Plaintiff then moved to strike defendants' answer. The court set the case down for trial, heard the arguments, overruled plaintiff's motion, sustained defendants' statement of defense and dismissed the suit on the ground that the prior adjudication was a bar to this action.
In this appeal plaintiff contends that the trial court erred in applying the doctrine of res judicata for the following reasons: (1) Defendants' answer was insufficient for a plea of res judicata because there was no showing there was a hearing on the merits in the prior equity action; (2) there was no specific finding in the prior action that the contract was illegal; (3) the contract contained certain legal covenants which were separable from the illegal ones; (4) the dismissal of the prior action to foreclose a mechanic's lien for want of equity does not preclude an action at law on a quantum meruit theory for work done; (5) the plea of res judicata is insufficient insofar as defendant Roger Lumber Company is concerned because that company was not a party to the prior action.
[1, 2] To be effective as a prior adjudication, judgment must have been upon the merits, but it is immaterial whether the judgment was upon the facts proved or upon the facts alleged which were admitted by demurrer. Life Printing & Pub. Co., Inc. v. Marshall Field, 327 Ill. App. 486; Marie M.E. Church of Chicago v. Trinity M.E. Church of Chicago, 253 Ill. 21. Defendants' motion to dismiss plaintiff's bill to foreclose *44 corresponded in our present day practice to a demurrer and had the effect of admitting the facts well pleaded in the bill.
[3, 4] While it is true that a motion to dismiss may be based on a technical deficiency in a pleading and in such case will not bar another action for the same cause (Sattenstein v. Earl, 328 Ill. 148; Marie M.E. Church of Chicago v. Trinity M.E. Church of Chicago, 253 Ill. 21), where, as in the instant case, an order of dismissal follows the ruling on the motion and recites the plaintiff's election to stand by the complaint, it is an adjudication of all the issues thereby raised. Doner v. Phoenix Joint Stock Land Bank of Kansas City, 381 Ill. 106. In the instant case the court's order stated that defendants' motion was "well founded" and it accordingly dismissed the complaint "for want of equity." It is clear from the record that the questions raised in the motion to dismiss went to the equities of the case and not to any question of defective pleadings. We are of the opinion that the judgment on the motion to dismiss was a judgment on the merits of plaintiff's cause of action.
[5] Plaintiff however contends that the equity court did not specifically adjudicate that the contract was illegal. This contention has no merit because the illegality of the contract was the precise issue raised by the motion to dismiss. The court's statement that the motion to dismiss was "well founded" and "accordingly sustained" sufficiently evidences a finding that the contract was illegal. Our Supreme Court has stated recently "that what has been adjudicated is to be determined not from the opinion rendered but from a consideration of the judgment actually entered in reference to the issues presented for decision." Adams v. Pearson, 411 Ill. 431. Some very pertinent language also appears in Sattenstein v. Earl, 328 Ill. 148, where the court said p. 154: "When a demurrer is sustained to a bill in equity, an order entered by the court expresses *45 the conclusion of the court. If the demurrer is sustained and goes to the right to relief it will be followed by a decree dismissing the bill for want of equity."
[6] Plaintiff further contends that the contract contains some legal promises on his part and that those which can be separated from the illegal promises are valid. We need not decide whether the contract in this case was divisible because even assuming it was, plaintiff raises the issue too late. If plaintiff thought the court erroneously construed the law in the equity suit, he should have appealed from the judgment in that case. He cannot now collaterally attack that judgment. In the Sattenstein case the court said that even "if it were conceded upon examination of the bill in the former case that the court erroneously decided that the bill then under consideration upon general demurrer did not state a cause of action, appellants are in no better position here. The final judgment following that decision was acquiesced in by them, and it is as binding upon them as if rendered upon evidence heard." Moreover, plaintiff's pleadings did not either in the instant or the prior case allege that the action was based upon services performed under the legal covenants of the contract, and though given the opportunity to do so, plaintiff never amended his pleadings to show reliance only on the legal covenants of the contract.
[7] Plaintiff contends that recovery on a quantum meruit is not barred by dismissal of a bill to foreclose a mechanic's lien based on an express contract. Whether we apply the doctrine of res judicata or estoppel by verdict, the fact remains that this contract has been adjudged to be illegal. The services performed were thus illegal and the unenforceable nature of an illegal, executed contract cannot be circumvented by disregarding the express contract and suing for the reasonable value of such illegal services. American Strawboard *46 Co. v. Peoria Strawboard Co., 65 Ill. App. 502, 527, 528.
We hold that plaintiff's action on the contract and on quantum meruit against defendant Harry Stone is barred by the prior adjudication that such contract was illegal and against public policy.
[8] The final question for our decision is whether the adjudication in the prior action can serve as a bar to recovery against defendant Roger Lumber Company. The lumber company was not a party to the suit in equity and its claim does not on its face rely on the contract between plaintiff and defendant Stone. It thus seems that the trial court erred in basing its dismissal of the claim against Roger Lumber Company on the former adjudication that the contract between plaintiff and Harry Stone was illegal and unenforceable.
[9] While we are of the opinion that plaintiff's statement of his claim against the lumber company failed to allege certain facts necessary to establish a cause of action, no motion to strike the pleading on account thereof was filed by defendants. Under such circumstances defendants should be required to answer that portion of the statement of claim relating to Roger Lumber Company.
The dismissal of the complaint against defendant Harry Stone is affirmed. The dismissal of the complaint against defendant Roger Lumber Company is reversed and the cause is remanded for further proceedings not inconsistent with the views herein expressed.
Affirmed in part, reversed in part and cause remanded.
McCORMICK, P.J. and ROBSON, J., concur.
