
58 Ill. App.3d 832 (1978)
374 N.E.2d 1071
DORIS STUTZKE, Plaintiff-Appellant,
v.
HOWARD EDWARDS, JR., et al., Defendants.  (E.S. MURPHY, M.D., Defendant-Appellee.)
No. 76-571.
Illinois Appellate Court  Second District.
Opinion filed March 30, 1978.
*833 Louis J. Perona, of Perona & Perona, of Spring Valley, for appellant.
Kenneth W. Traum, of Thomas, Kostantacos, Traum & Reuterfors, of Rockford, for appellee.
Reversed and remanded.
Mr. JUSTICE BOYLE delivered the opinion of the court:
Plaintiff-appellant, Doris Stutzke, hereinafter plaintiff, filed her second amended complaint on January 23, 1976, against defendants, Howard Edwards, Jr., and Donald Edwards, Edwards Clinic, a partnership, Mary Ada Ansel, Katherine Shaw Bethea Hospital, and E.S. Murphy, M.D. Count V of plaintiff's complaint was directed against only defendant-appellee, E.S. Murphy, M.D., hereinafter defendant. Count VI was directed against all the defendants including E.S. Murphy, M.D. After a hearing on defendants' motions which attacked various counts of plaintiff's complaint, the trial court granted some motions and gave plaintiff leave to amend within a certain time.
As to the defendant, Murphy, the trial court ordered counts V and VI be stricken and dismissed and granted plaintiff leave to file amended counts within 21 days (i.e., June 11, 1976). Plaintiff did not respond within that time, and on July 8, 1976, 27 days after the expiration of the 21-day period, the defendant filed a motion for a judgment on the pleadings and served a copy of same on the plaintiff's attorney. On July 12, 1976, plaintiff filed her notice that on July 16, 1976, she would request leave of court to file her third amended complaint, including counts VI and VII directed against the defendant. On July 16 the court denied leave to file the third amended complaint as against the defendant, Murphy, and entered judgment on the pleadings in favor of said defendant. The court later allowed the filing of the third amended complaint as against the other defendants but not as to defendant Murphy.
The trial court, in its order denying plaintiff leave to file her third *834 amended complaint, entered conclusions of law which are interesting in terms of this disposition. The court stated that the issue was:
"Whether the dismissal order of May 21, 1976, operated as an adjudication upon the merits of the cause.
The court holds that it did for the following reasons:
1. Supreme Court Rule 273 (Ill. Rev. Stat. 1969, Chapter 110A Sec. 273) provides as follows:
`Effect of Involuntary Dismissal.
Unless the order of dismissal or a statute of this state otherwise specifies, an involuntary dismissal of an action, other than a dismissal for lack of jurisdiction, for improper venue, or for failure to join an indispensable party, operates as an adjudication upon the merits.'"
The court further found that:
"The Judgment Order of the Court on May 21, 1976 does not fall within any of the enumerated exceptions of Supreme Court Rule 273. Therefore, since the Plaintiff failed to file her amended complaint within the time prescribed in the order of May 21, 1976 the plaintiff elected to stand on the amended complaint."
The trial court then proceeded in its opinion filed July 21, 1976, to direct defendant Murphy to prepare an order dismissing plaintiff's cause of action with prejudice and entered a judgment upon the pleadings with costs to be paid by the plaintiff. Plaintiff appeals from the order of dismissal of defendant entered on August 9, 1976, and from the order entered September 21, 1976, which denied plaintiff's motion to vacate said order of dismissal.
The issues presented are: (1) Whether the dismissal order of May 21, 1976, which permitted plaintiff 21 days' leave to amend her complaint, was a final order; and (2) Whether the record demonstrates the trial court exercised its discretion in denying plaintiff leave to amend her complaint.
Plaintiff places principal reliance on Gray v. Starkey (1976), 41 Ill. App.3d 555, 353 N.E.2d 703, and contends that the order of May 21, 1976, was not a final judgment because the trial court could have permitted an amended complaint to be filed after the expiration of the 21-day period for leave to amend to correct the technical deficiency of having failed to amend timely. Defendant, in rebuttal, contends that the order of May 21, 1976, was an adjudication upon the merits which operated as an involuntary dismissal which did not otherwise specify under Supreme Court Rule 273 (Ill. Rev. Stat. 1975, ch. 110A, par. 273) and was therefore a final order.
 1, 2 The well-settled rules which govern whether an order of the trial court is a final judgment were stated by this court in Maple Investment & *835 Development Corp. v. Skore (1976), 38 Ill. App.3d 654, 655, 348 N.E.2d 498, 499, wherein the court declared that:
"To constitute a final, appealable order, the order must terminate the litigation between the parties to the suit and finally determine, fix and dispose of their rights as to the issues made by the suit. [Citation.] A `final order' for the purposes of appeal must terminate the litigation between the parties, so that, if affirmed, the trial court has only to proceed with the execution of the judgment. [Citations.] An order denying a petition to vacate a judgment but allowing the defendant 30 days to file an amended petition is not a final, appealable order. [Citation]." (Emphasis added.)
Likewise, the Fifth District in Gray v. Starken (1976), 41 Ill. App.3d 555, found that orders of the trial court which deny or allow leave to file amended pleadings, as in the instant case, were not final judgments.
 3, 4 In the application of these principles to our facts, there is no doubt that the trial court erroneously determined that its order of May 21, 1976, was a final adjudication upon the merits, because the trial court's order was not a final judgment under Maple Investment & Development Corp. v. Skore (1976), 38 Ill. App.3d 654, and it still had the authority to permit plaintiff to amend beyond the 21-day period. (Gray v. Starkey (1976), 41 Ill. App.3d 555.) Also, the trial court's determination that Supreme Court Rule 273 was applicable because its order of May 21, 1976, acted as an adjudication upon the merits which did not otherwise specify was erroneous. Supreme Court Rule 273 applies only where there has been a dismissal of an action, with limited exceptions, which operates as an adjudication upon the merits. Accordingly, the trial court's order of May 21 was not an adjudication upon the merits, and Supreme Court Rule 273 has no application. The trial court's determination that the order was a final adjudication upon the merits is also irrelevant to our deliberations (Oak Brook Bank v. Citation Cycle Co. (1977), 45 Ill. App.3d 1053, 360 N.E.2d 458) because the test of the finality of an order lies in its substance and not the form adopted by the trial court. (Browning v. Heritage Insurance Co. (1974), 20 Ill. App.3d 622, 314 N.E.2d 1.) Defendant's related contentions concerning the intent and purpose of Supreme Court Rule 273 and its applicability to multiple parties in contradistinction to Supreme Court Rule 304 (Ill. Rev. Stat. 1975, ch. 110A, par. 304) need not be addressed at this time because, as we have shown, Rule 273 has no application to these facts.
 5 Our disagreement with the trial court's misplaced reasoning does not necessarily mandate a reversal if there exists any basis for affirmance of its order in the record before us. (Redd v. Woodford County Swine *836 Breeders, Inc. (1977), 54 Ill. App.3d 562, 370 N.E.2d 152.) Clearly under section 46(3) of the Civil Practice Act (Ill. Rev. Stat. 1975, ch. 110, par. 46(3)) "[a] pleading may be amended at any time, before or after judgment, to conform the pleadings to the proofs, upon terms as to costs and continuance that may be just." The trial court, under section 46(1) (Ill. Rev. Stat. 1975, ch. 110, par. 46(1)), also has the express latitude of exercising its sound discretion to determine whether an amendment of a pleading prior to the entry of final judgment is permissible. (M.C., Ltd., v. Colina (1977), 55 Ill. App.3d 730, 371 N.E.2d 145.) Similarly the trial court's determination as to whether there has been a lack of diligent prosecution rests in the trial court's sound discretion. (City of Crystal Lake v. Sak (1977), 52 Ill. App.3d 684, 367 N.E.2d 989.) The problem presented here is that there is no evidence in the record that the trial court denied this motion to amend the complaint in the exercise of its sound judicial discretion. On the contrary, the trial court was under the misimpression that his order of May 21, 1976, was a final judgment under Supreme Court Rule 273 and was res judicata as to plaintiff's new amended complaint.
In regard to this question of proper exercise of judicial discretion, at oral argument the defendant alluded to the almost three years that this case had been pending and contended that it would not be an abuse of judicial discretion for the trial court to deny plaintiff leave to amend her complaint 52 days late. Whether we agree or not with this statement by the defendant (and there are cases supporting each divergent point of view  Connaughton v. Burke (1977), 46 Ill. App.3d 602, 361 N.E.2d 87; Gray v. Starkey (1976), 41 Ill. App.3d 555, 353 N.E.2d 703), one principle is clear  it is for the trial court in the exercise of its sound judicial discretion to make this initial decision.
Accordingly, we reverse and remand this cause to the circuit court of Lee County for a reconsideration of plaintiff's motion for leave to file a third amended complaint and related pleadings consistent with the views expressed herein.
Reversed and remanded with directions.
SEIDENFELD, P.J., and WOODWARD, J., concur.
