Reference Subform name in Nav form Header (1 Viewer)

xyba

Registered User.
Local time
Today, 04:26
Joined
Jan 28, 2016
Messages
189
Hi

Is there anyway to show the name of the active subform in the nav form header?

I've tried something along the lines of the below but this doesn't work:

Code:
[Forms]![NavigationForm]![NavigationSubform].[Form]
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:26
Joined
Oct 29, 2018
Messages
21,455
Hi. Give this a try and let us know how it goes.
Code:
=[NavigationSubform].[SourceObject]
 

xyba

Registered User.
Local time
Today, 04:26
Joined
Jan 28, 2016
Messages
189
Hi. Give this a try and let us know how it goes.
Code:
=[NavigationSubform].[SourceObject]

Hi. Tried it but it returns #Name? error.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:26
Joined
Oct 29, 2018
Messages
21,455
Hi. Tried it but it returns #Name? error.
#Name? usually refers to a typo. Double-check the name for the subform control and try it again. The syntax I gave you works for me.
 

xyba

Registered User.
Local time
Today, 04:26
Joined
Jan 28, 2016
Messages
189
#Name? usually refers to a typo. Double-check the name for the subform control and try it again. The syntax I gave you works for me.

Hi, sorry but I don't understand. Was I supposed to simply copy and paste your code or did it need changing for my circumstances? Also, when you say 'Double-check the name for the subform control' check it where?

Apologies if I sound dumb.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:26
Joined
Oct 29, 2018
Messages
21,455
Hi, sorry but I don't understand. Was I supposed to simply copy and paste your code or did it need changing for my circumstances? Also, when you say 'Double-check the name for the subform control' check it where?

Apologies if I sound dumb.
Hi. Not sure if the following images would help you, but this is what my test form looks like using the syntax I posted earlier.





 

Attachments

  • navform1.PNG
    navform1.PNG
    26 KB · Views: 113
  • navform2.PNG
    navform2.PNG
    11.8 KB · Views: 111
  • navform3.PNG
    navform3.PNG
    8.9 KB · Views: 103

xyba

Registered User.
Local time
Today, 04:26
Joined
Jan 28, 2016
Messages
189
Hi. Not sure if the following images would help you, but this is what my test form looks like using the syntax I posted earlier.

I compared my nav form with yours and couldn't see any difference then, suddenly, mine worked. Strange.

Thanks for your help.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:26
Joined
Oct 29, 2018
Messages
21,455
I compared my nav form with yours and couldn't see any difference then, suddenly, mine worked. Strange.

Thanks for your help.
Hey, that's a win! Congratulations. Good luck with your project.
 

Users who are viewing this thread

Top Bottom