Path to SubForm Control with Tabs on MainForm (1 Viewer)

cPineda

New member
Local time
Today, 11:38
Joined
Jun 6, 2018
Messages
2
Hi.

Looking at the example for Path to SubForm Control - MainForm.NavigationSubForm>Form1.Subform1

How should this be modified given the following -
1. On MainForm, I included tabs
2. NavigationSubForm is on the 3rd tab on MainForm

I tried the following MainForm.Page3.NavigationSubForm>FormTempMinistry.DS

where <Page3> is the Name of the 3rd tab on MainForm. It didn't work. Error message states that the Path argument is not valid.

I am able to make this work on MainForm without the tabs (code: MainForm.NavigationSubForm>FormTempMinistry.DS), but if tabs are necessary to organize things, how should the code be modified?

Thank you in advance!
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 14:38
Joined
May 21, 2018
Messages
8,701
The tab control is weird, it is as it is not there. No difference if you did not have a tab control.
If called from the main form
me.MysubformControl.form
or external
forms("MainFormName").MysubformControl.form

The important word is "form" after the name of the subform control. That says to return the form object that is inside your subformcontrol.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 14:38
Joined
May 21, 2018
Messages
8,701
Code:
MainForm.Page3.NavigationSubForm>FormTempMinistry
That does not make any sense even taking out the page name. There are tons of references on the internet for this. If called from your main form, then you can use Me instead of a reference with the name.

Me.NavigationSubForm.Form (the word Form not the name of the object in the subform control)

or if called outside the main form
Forms!MainFormName.NavigationSubForm.Form
which is the same but a different notation
Forms("MainFormName").NavigationSubForm.Form
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:38
Joined
Feb 19, 2002
Messages
43,782
Are you really using a "Navigation" form? These forms have interesting gotchas and I'm surprised one would work at all as a subform on another form.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 14:38
Joined
May 21, 2018
Messages
8,701
I may have interpreted this wrong. I assumed this was a main form with a standard tab control with a standard subform on it called navigationsubform.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:38
Joined
Feb 19, 2002
Messages
43,782
That's why I asked for clarification. There is no point in continuing if we don't know what we are working with.
 

Users who are viewing this thread

Top Bottom