Ewbank, C. J.
An affidavit was filed which purported to charge that the appellant feloniously, in the night time, broke and entered the warehouse of K. with intent feloniously to steal the goods of said K. It did not comply with all the rules of good pleading and appellant, filed a motion to quash it, which motion was overruled, and appellant excepted. A plea of former adjudication was then filed by appellant, to which the court sustained a demurrer, and after the arraignment of appellant and his plea of “not guilty” a jury was impaneled and sworn to try the cause. The court then set *433aside its former ruling on the motion to quash, and entered an order sustaining that motion and quashing the affidavit, and thereupon discharged the jury, to all of which the appellant excepted.
1. The first assignment of error challenges the ruling on the demurrer to appellant’s plea addressed to said original affidavit. But since the motion to quash that affidavit was sustained, and an amended affidavit was filed, on which appellant was placed on trial, such original affidavit, together with the plea addressed thereto and the demurrer to such plea, no longer constitute any part of the record on appeal. §691 Burns 1914, §650 R. S. 1881; §§2228, 2231 Burns 1914, Acts 1905 p. 584; Kempton Lodge v. Mozingo (1913), 180 Ind. 566, 568, 103 N. E. 411; Ewbank’s Manual (2d ed.) §116b.
2. Neither could appellant reserve an available exception to an order sustaining a motion made by himself which he had not withdrawn nor attempted to withdraw. And if the court, after overruling his motion addressed to the pleadings, became convinced that it had committed an error, it had power to set aside the ruling at any time before final judgment and sustain the motion, such motion not having been withdrawn. Hartlep v. Cole (1885), 101 Ind. 458, 460; First National Bank v. Williams (1891), 126 Ind. 423, 425, 26 N. E. 75.
3. In any case the plea that appellant previously had been prosecuted and convicted on a charge of larceny, for taking from the warehouse which this affidavit charged him with breaking and entering, the same goods named in this affidavit as the goods which he intended to steal when committing the alleged burglary, did not state a cause of defense. Unless an indictment for larceny also charges the offense *434of burglary, a conviction or acquittal of larceny will not bar a subsequent prosecution for burglary committed as a means of taking the goods stolen. State v. Warner (1860), 14 Ind. 572; Smith v. State (1882), 85 Ind. 558, 557; Fisher v. State (1871), 46 Ala. 717; Gordon v. State (1882), 71 Ala. 815; People v. Delvin (1904), 143 Cal. 128, 130, 76 Pac. 900; Nagel v. People (1907), 229 Ill. 598, 603, 82 N. E. 315; State v. Ingalls (1896), 98 Iowa 728, 730, 68 N. W. 445; People v. Parrow (1890), 80 Mich. 567, 571, 45 N. W. 514; State v. Hackett (1891), 47 Minn. 425, 427, 50 N. W. 472, 28 Am. St. 380; Sharp v. State (1901), 61 Neb. 187, 191, 85 N. W. 38; Howard v. State (1880), 8 Tex. App. 450; Moundsville v. Fountain (1885), 27 W. Va. 182, 196; 1 Bishop, New Criminal Law §1062; 2 Wharton, Criminal Procedure (10th ed.) §1307.
4. 5. *4354. *434An amended affidavit was filed charging appellant with breaking and entering the warehouse of K. with intent to steal the goods of K. on a date named. To this appellant filed a verified plea in which he recited the filing of the original affidavit, setting it out, and alleged that appellant filed a motion to quash it, which was overruled and he excepted, and that on the same day he pleaded not guilty, and a jury was impaneled and sworn, but that thereafter, also on the same day, the court sustained the motion to quash said affidavit, and thereupon discharged the jury. And he alleged that both affidavits charged the same offense, and that he had been placed once in jeopardy for said offense, and could not be tried again. Incidentally he averred that the first affidavit stated the alleged public offense with sufficient certainty so that the action of the court in sustaining the motion to quash it was erroneous. No rule of law is more firmly established than that a party cannot successfully complain on appeal of an error which he procured the trial *435court to commit, and that filing a motion will estop a party to challenge a ruling sustaining such motion, where it is not dismissed or withdrawn. Ewbank’s Manual (2d ed.) §255. Therefore appellant is estopped to deny that the first affidavit was properly quashed. And having procured that ruling to be made, by filing his motion asking the court to quash the affidavit, he was thereby put in the same situation as if the first affidavit had never been filed. Joy v. State (1860), 14 Ind. 139; Miller v. State (1904), 33 Ind. App. 509, 512, 71 N. E. 248; Mills v. State (1875), 52 Ind. 187, 191; Ex parte Bradley (1874), 48 Ind. 548, 551, 557.
6. Besides, sustaining a demurrer to the special plea of former jeopardy was harmless in each instance, because under the plea of not guilty entered by appellant to the first affidavit and entered by the court on his behalf when he refused to plead to the second affidavit (§2072 Burns 1914, Acts 1905 p. 584), “the defendant may show and prove on the trial that he had before had judgment of acquittal * * * for the same offense, or any matter of defense except insanity.” §2069 Burns 1914, §1763 R. S. 1881. And in the absence of any showing that he was denied an advantage to which he would have been entitled under his special plea we cannot .deem the ruling harmful. Barker v. State (1918), 188 Ind. 263, 267, 120 N. E. 593.
It is not made to appear that the appellant introduced or offered to introduce any evidence to prove former jeopardy.
The judgment is affirmed.