Form.Subform.Subform.LinkMasterFields

S

Stapes

Hi

What is the correct way to do this?

[Forms]![FM_MainDetails]![FMS_Boat_subform]!
[FMS_JobDetails].LinkMasterFields = "BoatJobNo"

I get an error message: Object doesm't support this method.

Stapes
 
S

Sietske

Thank you for the very clear explanation!

In addition to the question of Stapes:
How to refer to a subsubform on a subform from a form?

Is this possible? And if not: is it possible to refer to a subsubform from a
subform?


Allen Browne said:
You need to include the .Form bit:

[Forms]![FM_MainDetails]![FMS_Boat_subform].Form![FMS_JobDetails].Form.LinkMasterFields
= "BoatJobNo"

Explanation:
Referring to Controls on a Subform
at:
http://allenbrowne.com/casu-04.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Stapes said:
What is the correct way to do this?

[Forms]![FM_MainDetails]![FMS_Boat_subform]!
[FMS_JobDetails].LinkMasterFields = "BoatJobNo"

I get an error message: Object doesm't support this method.

Stapes
 
S

Sietske

Never mind, I found it already. For other people who might want to know how:


Me.ControlnameForSubform.Form!ControlnameForSub-subform.Form!NameOfControlToInfluence

and


Me.ControlnameForSubform.Form!ControlnameForSub-subform.Form.NameOfPropertyToSet

I use it in the VBA code of my main form and it works OK.


Sietske said:
Thank you for the very clear explanation!

In addition to the question of Stapes:
How to refer to a subsubform on a subform from a form?

Is this possible? And if not: is it possible to refer to a subsubform from a
subform?


Allen Browne said:
You need to include the .Form bit:

[Forms]![FM_MainDetails]![FMS_Boat_subform].Form![FMS_JobDetails].Form.LinkMasterFields
= "BoatJobNo"

Explanation:
Referring to Controls on a Subform
at:
http://allenbrowne.com/casu-04.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Stapes said:
What is the correct way to do this?

[Forms]![FM_MainDetails]![FMS_Boat_subform]!
[FMS_JobDetails].LinkMasterFields = "BoatJobNo"

I get an error message: Object doesm't support this method.

Stapes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top