move subform of subform

Jaye7

Registered User.
Local time
Today, 22:54
Joined
Aug 19, 2014
Messages
205
I often move sub forms up and down within a form using something like.

Code:
forms!MyMainForm!MySubform.form.top = 500
However, I am having trouble moving a subform within a subform of a form.

Code:
Forms!MyMainForm!!MySubform!MySubformSubForm.form.top = 500
 
I honestly don't know if it's possible to go down more than 2 subforms in this manner. I've never tried... but it just seems like an absolute headache lol.

Have you tried initiating code on an event for the subform in question? That way you may be able to refer to the form control more easily than this.

I assume the proper way to refer to it would be :
Code:
Forms!Mainform!Subform1.Form!Subform2.Form!Subform3.Form.Top = 500

The only other thing I can think of is you may need to go double check what the subform CONTROL is named on its parent form. So essentially make sure are referring to the "Name" property under "Other" on your subform.

I've ran into this naming problem on accident when dragging say... "sfrmExample" from the Navigation Pane to its Parent Form. The CONTROL name of my subform on it's parent changed to something like "sfrmExample subform" which obviously meant my code couldn't find it because I was referring to the form name and not the control name... which is what this entails... as far as I am aware lol.

Hope that info was of some use to you buddy. Last I can offer is this site that has a lot of good references. This page in particular is about just this subject (but only gives examples down for 2 subforms)

access.mvps.org/access/forms/frm0031.htm

(I can't post links yet so...)
 
Sorry for the late reply, unfortunately it doesn't help with this problem
 

Users who are viewing this thread

Back
Top Bottom