Evidence for the State tended to show that shortly after 9:15 a.m. on 29 May 1979 two armed men wearing ski masks entered the Long Leaf Branch of First Citizens Bank and Trust Company in Wilmington. Each was armed, one with a small silver gun, the other with a large black handgun which had a brown stock and a black barrel. The masked men shouted obscenities, laughed and told everyone to “[p]ut your hands up” and to “[h]it the floor.” The robber with the small silver gun then shot a bank customer in the back, seriously wounding him. Another shot was fired, and the robbers took money from all the cashiers’ drawers. Included in the money stolen was approximately $1,000 in bait money, specially packaged twenty dollar bills of whose series and serial numbers the bank had made a list. The robbers wore long shirts and gloves, and the witnesses were unable to determine even their race. After emptying the cash drawers, the robbers fled in a green Ford pickup truck with either yellow or white stripes on the sides.
A truck fitting the general description of the one used in the bank robbery was stolen from Jerry Lee Little on the night of 4 April 1979. Little’s truck was recovered two and one-half months later on 26 June 1979. A set of jumper cables, a jack, a chain and some tools were missing. Defendant was not charged with this theft.
On 24 June 1979 Raeford Newman discovered that his white Ford pickup truck had been stolen from his home. He had last seen his truck on the previous day around noon. The police spotted the truck on 25 June 1979 parked in some woods in Wilmington and, with Newman’s permission, placed the truck under surveillance. The next morning, 26 June 1979, at approximately 8:45, three males were seen walking into the woods and shortly thereafter the truck was driven out of the woods. Three people were inside. Two had ski masks on; the third’s face was concealed by a yellow garment. The police chased the vehicle to another wooded area, and the truck stopped. The occupants fled on foot into the woods and were not captured. The two ski masks were found inside the truck. A search of the wooded area yielded a *125wallet containing an operator’s and a chauffeur’s license issued to defendant and a yellow head covering.
On the afternoon of the same day the police had under surveillance a Chevrolet Corvette and a motorcycle parked in the doctor’s parking area at New Hanover Memorial Hospital. Defendant’s sister, Diana Silva Shiver, and half-brother, William Evans, were seen circling the lot and were stopped and questioned by the police. As a result of the discovery of driver’s licenses issued to defendant and information given them by defendant’s sister, the police arrested defendant on the evening of 26 June 1979 at William Evans’s home.
On the afternoon or evening of 26 June 1979 the police went to Winnabow to search the home where defendant lived with his mother and sister. Although the police had obtained a warrant to search the home, it was never served or returned. Defendant’s sister, Ms. Shiver, accompanied the police to the home and gave her consent to the search.
A search of defendant’s bedroom revealed a yellow shirt, a blue bank bag and a snubnose .38 revolver which matched the description of one of the guns used in the robbery. Ms. Shiver and FBI Agent Zimmerman were allowed to testify over defendant’s objection as to the items seized from his bedroom, but Judge Bruce subsequently ruled that the search of defendant’s bedroom was illegal and instructed the jury to disregard that evidence. Search of a truck parked outside the home yielded a set of jumper cables similar to those missing from Mr. Little’s truck.
On 2 July 1979 defendant was questioned by police officers. The officers advised him of his constitutional rights, and he signed a written waiver of them. Although defendant did not expressly admit his participation in the robbery, he agreed to lead the police to the wooded area where checks stolen in the robbery had been discarded. The checks were found in the spot where defendant led them. He told the police that the- checks had been left in the woods when he and his accomplices divided the robbery proceeds and that he had planned the robbery. The wooded area where the checks had been discarded was the same area where Mr. Little’s green Ford pickup truck had been found on 26 June 1979.
*126Defendant offered no evidence. His motion to dismiss the conspiracy charge was allowed at the close of all evidence, and the charges of robbery with a dangerous weapon and felonious larceny of an automobile were submitted to the jury. The jury returned verdicts of guilty as charged and Judge Bruce sentenced defendant to life imprisonment.
Other facts pertinent to this decision will be noted below.
 Defendant first assigns as error the consolidation for trial of the robbery, larceny and conspiracy charges.
G.S. 15A-926(a) (1978) governs the joinder for trial of several charges against the same defendant. It provides that “[t]wo or more offenses may be joined ... for trial when the offenses, whether felonies or misdemeanors or both, are based on the same act or transaction or on a series of acts or transactions connected together or constituting parts of a single scheme or plan.” Thus, offenses may be joined for trial if they are based on the same act or transaction or arise out of a series of acts or transactions which are connected together or are part of a single scheme or plan. Id.; State v. Bracey, 303 N.C. 112, 277 S.E. 2d 390 (1981). In short, for offenses to be joined, there must be a “transactional connection” common to all. State v. Powell, 297 N.C. 419, 428, 255 S.E. 2d 154, 159 (1979).
A mere finding of the transactional connection required by the statute is not enough, however. In ruling on a motion to consolidate, the trial judge must consider whether the accused can receive a fair hearing on more than one charge at the same trial; if consolidation hinders or deprives the accused of his ability to present his defense, the charges should not be consolidated. State v. Greene, 294 N.C. 418, 241 S.E. 2d 662 (1978); State v. Davis, 289 N.C. 500, 508, 223 S.E. 2d 296, 301, death sentence vacated, 429 U.S. 809, 97 S.Ct. 47, 50 L.Ed. 2d 69 (1976). A motion to consolidate charges for trial is addressed to the sound discretion of the trial judge and that ruling will not be disturbed on appeal absent an abuse of discretion. E.g., State v. Bracey, 303 N.C. 112, 277 S.E. 2d 390 (1981); State v. Davis, 289 N.C. 500, 223 S.E. 2d 296. If, however, the charges consolidated for trial possess no transactional connection, then the consolidation is improper as a matter of law. See G.S. § 15A-926(a).
*127We are faced here with a complex set of facts. Defendant was indicted for armed robbery of a bank, larceny of a truck and conspiracy to commit another bank robbery. At the time the motion for consolidation was made and the charges were ordered consolidated, there appeared to be a transactional connection among the three charges. The State’s theory of this case was that defendant, with others, conceived a scheme to rob banks whereby he and his accomplices would steal a vehicle and use that vehicle to transport them to and from the targeted bank. Such a theory, in our opinion, provides an adequate basis to support a finding of a “transactional connection.” Although the conspiracy charge, the actual link connecting the armed robbery and larceny charges, was dismissed at the close of the evidence, that fact does not and cannot enter into our consideration of whether Judge Bruce abused his discretion in allowing joinder. Whether an abuse of discretion occurred must be determined as of the time of the order of consolidation; subsequent events are irrelevant on this issue. See State v. Blizzard, 280 N.C. 11, 184 S.E. 2d 851 (1971). Because at the time the consolidation order was entered there appeared to be a sufficient transactional connection among the three offenses, we hold that the trial judge committed no abuse of discretion. Given the State’s theory of a single scheme to commit bank robberies, we think that there was no abuse of discretion “in permitting the State to paint its entire picture on a single canvas,” id. at 13, 184 S.E. 2d at 853.
This, however, does not end our inquiry. As noted above, the statutorily required transactional link, the conspiracy charge, was never shown at trial. The conspiracy charge was dismissed at the close of all the evidence, leaving no transactional connection between the armed robbery and the larceny charges. The disappearance of the transactional link raises the question of whether, when subsequent developments at trial negate the existence of the transactional link, the joinder is improper as a matter of law, i.e., whether subsequent developments can render the joinder improper. We think not. Joinder is a decision which is made prior to trial; the nature of the decision and its timing indicate that the correctness of the joinder must be determined as of the time of the trial court’s decision and not with the benefit of hindsight. See State v. Blizzard, 280 N.C. 11, 184 S.E. 2d 851. While this rule may seem severe and, perhaps, highly prejudicial to an accused, *128our statutes provide a method by which an accused may protect against prejudice to his defense. Under G.S. 15A-927(a), a defendant may protect his right to a fair determination of the charges against him by making a pre-trial motion for severance. If this motion is overruled, the defendant may preserve his challenge to the joinder by renewing his motion before or at the close of all evidence. G.S. § 15A-927(a)(2) (1978). If, during the presentation of the State’s evidence, severance becomes justified on a ground not previously known to the defendant, the challenge is preserved by a motion for severance made before or at the close of the State’s evidence. G.S. § 15A-927(a)(1) (1978). If a severance motion is not made or is not renewed at the appropriate time, the right to severance is waived. G.S. § 15A-927(a)(2). On motion, the trial court must order severance during trial if it finds it “necessary to achieve a fair determination of the defendant’s guilt or innocence of each offense,” G.S. § 15A-927(b)(2) (1978). If a motion for severance is granted during trial, a motion by defendant for a mistrial must also be granted. G.S. § 15A-927(a)(4) (1978).
Defendant here moved to sever prior to trial but did not renew that motion at the close of all evidence; therefore, he has waived any right to severance, G.S. § 15A-927(a)(2). Thus, we need not consider whether, under the facts of this case, defendant became entitled to severance when the conspiracy charge was dismissed, and we hold that the consolidation of charges for trial was not in error.1
 Defendant next assigns as prejudicial error the failure of the trial court to excuse the jury and to conduct a voir dire on the legality of the search of defendant’s bedroom immediately upon defendant’s general objection to testimony concerning the fruits of that search.
During the State’s presentation of its case, defendant’s sister, Diana Silva Shiver, testified that she accompanied the law enforcement officers on their search of the home where she and *129defendant lived with their mother. Ms. Shiver told the jury that she saw the officers find a .38 revolver under the mattress of defendant’s bed, a yellow shirt in the trash can and a blue bank bag behind a false panel in the fireplace. Defendant objected to her testimony concerning the revolver, but his objections were overruled.
The State’s next witness, FBI Agent Joseph Zimmerman, in response to questions asked by the District Attorney, testified in detail about items seized from defendant’s bedroom:
We searched David’s room first. I searched David’s room. As you went in the room, on the immediate left inside the door of David’s room, there was a small dresser. I searched it first.
Q. Did you find anything there?
Mr. Scott: Objection.
COURT: Did you object?
Mr. SCOTT: Yes sir.
A. Nothing that I confiscated.
Q. Okay. Where did you go after that?
A. I then searched a closet.
Q. Did you find anything in there?
A. I did not.
Q. What did you do after that?
A. I next came upon a fireplace that had a false front or wind front — some type of plywood edifice there and I pulled it out and found the bank bag.
Mr. Scott: Objection. Motion To Strike.
Court: Objection Overruled. Motion To Strike Denied.
Q. After you found that, what did you do?
*130A. There was another bureau located to the right of the fireplace and we searched that and found nothing. Next was the bed and a night stand, and we confiscated the —
Mr. Scott: Objection.
A. I confiscated a thirty eight snub nose detective special, Colt in brand, from underneath the mattress near the head of the bed.
Q. Can you describe that revolver?
A. It was what they call a snub nosed revolver, two and a half inch barrel. It had heavy brown stocks and it was blue steel.
A. It was a new weapon.
Q. What did you do after that?
A. There was a night stand immediately to the right of the bed that produced nothing. Then there was a foot locker, I believe —seems that there was something between the night stand, I think another dresser. And then there was a dresser just on the other side —no, excuse me, just before the dresser was a trash can located next to the dresser in which we found the —
Mr. Scott: Objection.
A. —in which I found —
COURT: Approach the Bench.
At this point, the trial judge excused the jury and conducted a voir dire hearing on the legality of the search of defendant’s bedroom. After hearing the evidence, he found as fact that the officers had in their possession a search warrant for the Winnabow home but that it was never properly served or returned and that Diana Silva Shiver had consented to the search of the home. Based on these findings, he concluded that Ms. Shiver had no authority to consent to the search of defendant’s bedroom and that the search of the bedroom was unlawful. He ordered that the *131testimony concerning the items seized during the search be suppressed. When the jury members returned, Judge Bruce instructed them: “Ladies and Gentlemen, reference to the blue bank bag, the thirty eight caliber pistol found underneath the mattress and the State’s Exhibit 36, the piece of the yellow shirt, is hereby stricken. You are not to consider those items as evidence in this proceeding.” Immediately after this instruction was given the defendant moved for mistrial under G.S. 15A-1061.2 Judge Bruce denied the motion, finding that defendant had suffered no substantial prejudice. No additional curative instruction was given.
Defendant contends that his general objections to the testimony of Ms. Shiver and Agent Zimmerman were sufficient to raise the issue of the legality of the search and to require the trial judge immediately to conduct a voir dire and that the trial judge’s failure to do so constitutes reversible error. Under the facts of this case, we agree that the admission of the evidence of the fruits of the search prior to holding a voir dire was error and that the delayed voir dire hearing and ruling and subsequent curative instruction were insufficient to correct it.
It is a well-established principle of constitutional law that fruits of an unlawful search may not be admitted against a defendant in a criminal proceeding in a state court, assuming, of course, that the defendant has standing to challenge the legality of the search. Mapp v. Ohio, 367 U.S. 643, 81 S.Ct. 1684, 6 L.Ed. 2d 1081 (1961). Although the boundaries of this exclusionary rule are by no means certain, see, e.g., Burkoff, The Court that Devoured the Fourth Amendment: The Triumph of an Inconsistent Exclusionary Doctrine, 58 Ore. L. Rev. 151 (1979), the principle of enforcing the fourth amendment guarantee of security in person and abode through removal of the incentive to violate that right remains intact and is binding upon the states.
Defendant contends that when a general objection to testimony concerning a search is entered the trial judge must im*132mediately conduct an inquiry into the legality of the search outside the jury’s presence. Although this Court has never addressed this point, the Court of Appeals, in State v. Fowler, 3 N.C. App. 17, 164 S.E. 2d 14 (1968), has held that “when the defendant objects to evidence obtained by a search which requires a search warrant, the court should determine the legality of the search by a preliminary inquiry in the absence of the jury, and that . . . the general objection is sufficient.” Id. at 22, 164 S.E. 2d at 17.
We agree with the reasoning of the Court of Appeals in Fowler. This Court, long ago, instituted the rule that the State must establish the legality of the search as a prerequisite to the admission of evidence concerning the search unless the defendant has waived his right or has no standing to challenge the search. State v. McMilliam, 243 N.C. 771, 92 S.E. 2d 202 (1956). The legality of a search and the admissibility of evidence obtained by the search are not matters for the jury’s determination but are matters of law to be decided by the trial judge outside the jury’s presence. E.g., State v. Spillars, 280 N.C. 341, 185 S.E. 2d 881 (1972). Although this Court has never been faced with the question of whether a general objection is sufficient to raise the question of the legality of the search and to force the State to its proof, we have considered this question as it applies to the area of confessions.
In State v. Vickers, 274 N.C. 311, 163 S.E. 2d 481 (1968), the defendant entered a general objection when the State sought to introduce incriminating statements made by defendant to a law enforcement officer while in custody. The trial judge overruled the objection and the evidence was admitted. On appeal, this Court granted a new trial for failure to make a preliminary inquiry and stated:
For more than one hundred years this Court has recognized that “it is the duty of the judge to decide the facts upon which depends the admissibility of testimony; he cannot put upon others the decision of a matter, whether of law or of fact, which he himself is bound to make.” State v. Andrew, 61 N.C. 205. The requirement now recognized in North Carolina that there should be a preliminary investigation in the absence of the jury to determine the voluntariness of confessions is demanded because of the conclusive nature of a confession. A trial jury’s deliberations should not be infected by forcing a defendant to fight out his objection as to *133admissibility of an alleged confession in the presence of the jury. Even though the trial court might, after a hearing in the presence of the jury, rule out the confession as being involuntary and instruct the jury not to consider it in determining the innocence or guilt of a defendant, yet it must, in most cases, be prejudicial against the defendant.
Id. at 318, 163 S.E. 2d at 486. While items seized during a search may not possess the same degree of conclusiveness as a confession, there is no way for the trial judge to know the damaging nature of the fruits of the search until the testimony has been heard. If the testimony is first heard before the jury, it will be too late, in many instances, to protect the fourth amendment rights of the defendant. The need to protect the defendant’s constitutional rights and the rule that the State lay a foundation for testimony concerning a search either by producing the warrant or otherwise proving the legality of the search require, we think, that the trial judge conduct an inquiry into the legality of the search in the absence of the jury upon a general objection to the proffered testimony by the defendant.
The State contends that even if the trial judge erred in failing immediately to conduct a voir dire, his subsequent curative instruction was sufficient to avert any prejudice. We disagree. While the general rule is that an instruction that evidence is not to be considered accompanied by the withdrawal of that evidence cures any error in its admission, e.g., State v. Brown, 266 N.C. 55, 57, 145 S.E. 2d 297, 299 (1965), the rule is inapplicable when the error admitting the evidence is of constitutional dimension. When the error committed deprives a defendant of a constitutional right, prejudice is presumed, and the burden is on the State to prove otherwise. G.S. § 15A-1443(b) (1978). In the case before us, the evidence erroneously admitted, though withdrawn, was of a highly incriminating nature: a blue bank bag similar to ones stolen from First Citizens Bank and a gun similar to one used in the bank robbery. While there was other evidence of defendant’s guilt, as noted below, this evidence may have been discovered by confronting defendant with the fruits of the illegal search, rendering his confession and subsequent actions inadmissible. Because the record does not demonstrate beyond a reasonable doubt that defendant was not prejudiced by the admission of evidence resulting from the illegal search, the State has failed to carry its burden, and defendant is entitled to a new trial.
*134In a related assignment on appeal, defendant contends that the trial court erred in denying his motion for mistrial made immediately after the curative instruction was given to the jury. In light of the foregoing discussion concerning the admission of the evidence and our disposition of that issue, we deem it unnecessary to discuss this assignment as it is unlikely to recur.
 By his next assignment of error defendant contends that the trial court erred in admitting into evidence testimony about incriminating statements made by and actions of the defendant.
On 2 July 1979 defendant, after being advised and signing a written waiver of his constitutional rights, agreed to take the police to the place where he had left a quantity of checks stolen during the bank robbery. He directed them into a wooded area, and, during the trip, told officers about the route he and his accomplices had taken in flight from the bank, that he had planned the robbery, and various other details concerning events following the robbery. He led the officers to the discarded checks and told them how the money had been divided. Testimony concerning the events of 2 July 1979 was admitted and the jury was allowed to consider the evidence in its deliberations.
Prior to the admission of this testimony, a voir dire was conducted to determine its admissibility. At the conclusion of the voir dire Judge Bruce found that the confession was voluntarily given and overruled defendant’s objection.
Defendant’s assignment of error is based on the trial judge’s refusal to allow him to inquire into whether the incriminating evidence seized during the illegal search of defendant’s bedroom in any way influenced, induced or coerced his confession. Due to poor preparation of the record on appeal, this Court has been presented with only a single excerpt from the voir dire hearing, a part of defendant’s cross-examination of Detective Elledge, an officer with the Wilmington Police Department who was questioning the defendant when Agent Zimmerman and other officers returned from searching defendant’s home:
Q. And did you see Mr. Zimmerman when he came back that night to the police station?
*135A. When he came back?
A. From where?
A. I’m sure I seen him.
Mr. Boney: Objection.
Q. Did he have anything with him when he came back?
Mr. Boney: Objection.
Mr. SCOTT: Can I get his answer in the record please?
COURT: No. Go ahead.
Q. Did he have a pistol with him when he came back?
Mr. Boney: Objection.
Mr. SCOTT: Can I get that answer in the record?
Q. Did he have a yellow shirt with him when he came back?
Mr. Boney: Objection.
COURT: SUSTAINED. No, you may not get the answer in the record.
Mr. SCOTT: I have no further questions.
Court: (To the witness.) — Come down. No further evidence. All right, Sheriff, take a recess until 9:30 A.M. Monday morning.
Exception No. 15.
The trial court’s refusal to allow defense counsel to preserve the witness’s answer in the record constitutes error which renders this Court unable to determine the voluntariness of the confession *136and, therefore, constitutes error. See 1 Stansbury’s North Carolina Evidence § 26 (Brandis Rev. 1973). As we stated in State v. Chapman, 294 N.C. 407, 415, 241 S.E. 2d 667, 672 (1978):
[W]e regard the trial judge’s refusal to allow counsel to complete the record as a regrettable judicial mistake. A judge should be loath to deny an attorney his right to have the record show the answer a witness would have made when an objection to the question is sustained. In refusing such a request the judge incurs the risk (1) that the Appellate Division may not concur in his judgment that the answer would have been immaterial or was already sufficiently disclosed by the record, and (2) that he may leave with the bench and bar the impression that he acted arbitrarily.
In Chapman, we held that defendant had suffered no prejudice from the erroneous refusal to allow the answers to be preserved because, no matter what the answer would have been, it would have been immaterial and/or cumulative. See also State v. Stanfield, 292 N.C. 357, 233 S.E. 2d 574 (1977). Here, the facts disclosed by the record are such that we cannot hold that defendant suffered no prejudice. Defendant is correct in arguing that if his confession and subsequent actions were induced by knowledge that his bedroom had been searched and incriminating evidence seized, then his confession would be rendered inadmissible as involuntary. State v. Hall, 264 N.C. 559, 142 S.E. 2d 177 (1965). We stress that the record does not establish that the confession was induced by the illegal search; the error lies in the refusal of the trial judge to allow inquiry or preservation of evidence for the record on that issue.
While the record does not establish that the admission of the confession was error, defendant must be given an opportunity to establish, if he can, that his actions were indeed involuntary because induced by the fruits of the illegal search and, therefore, he must be granted a new trial.
Defendant’s remaining assignment of error challenges the propriety of the trial court’s inclusion of restitution as a condition of work release or parole. Because defendant is entitled to a new *137trial on other grounds, this assignment is now moot, and we shall not address it.
We must caution counsel that the Rules of Appellate Procedure are mandatory; it is essential that the record on appeal be prepared thoroughly and in accord with those rules. Such was not the case here. For example, the record submitted on appeal does not include the indictment on the conspiracy charge, nor does it give any indication as to the disposition of that charge. In order to dispose of the joinder issue it was necessary for this Court to obtain a transcript from the Superior Court, New Hanover County. It is not the function of this Court to serve as counsel for the defendant.
By virtue of errors committed by the trial court, the State is now forced to retry a defendant who has confessed to the crimes with which he is charged. Other evidence against him is substantial. This is the unfortunate result when a trial judge stubbornly refuses to allow counsel to have answers preserved for the record and when other constitutional rights of the defendant, long established in this jurisdiction, are violated.
Because of the delay in holding a voir dire on the legality of the search of defendant’s bedroom and the refusal of the trial court to allow defendant to inquire into whether items seized in the illegal search induced his confession, we conclude that defendant is entitled to new trials on the charges of armed robbery and larceny of an automobile.