Question

I am looking to see if there is an easy way to rename subforms. I have a single form with about 8 forms, and 8 queries running each subform. I want to systematically rename each form and query I thought I had done this in the past though when I rename a form or query I get the error regarding the subform is missing. Obviously this is caused by the fact that I broke the link between form and subform.

Normally if this was just 1 or 2 subforms I would just remove the old ones and add the new ones back in there. Though As there are so many on this form, I would rather avoid having to do that if possible because each form also has to be arranged a specific way since this will be converted to a PDF at some point.

TL:DR I want to rename multiple subforms without having to re-add them back onto the main form (if possible)

Was it helpful?

Solution

  1. Open the main form in Design View
  2. Select a subform control (make sure to select the control, not the form it contains).
  3. Open the control's property sheet and select the name of the new form from the Source Object dropdown.

Source Object property of a subform control

You will need to perform steps 2 & 3 for each of the 8 subform controls.

If that's more effort than you want, look into the Track Name Autocorrect property in the database options. I'm not sure whether that would automagically update the subform Source Object property when you rename the form object, but it shouldn't take long to find out. Personally I mostly avoid turning on Track Name Autocorrect because it's been reported to cause odd behavior. If you use it, consider turning it on only when you need to rename a bunch of objects and turn it back off afterward.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top