Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / February 2007

Tip: Looking for answers? Try searching our database.

LinkMasterFields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stapes - 27 Feb 2007 19:39 GMT
Hi

I am trying to execute the following code: -

   [Forms]![FM_MainDetails]![FMS_Boat_subform]!
[TM_JobDetails_subform].LinkMasterFields = "jobno"

jobno is a hidden control in Form FM_MainDetails.
However, it isn't finding it. Instead it keeps throwing out a dialog
asking me to enter the parameter.

I have tried moving the hidden control to the subform
FMS_Boat_subform, but that made no difference. In another place I
have: -

FMS_Boat_subform.LinkMasterFields = "boatnam"

where boatnam is also a hidden control on the same form
FM_MainDetails. This one works perfectly.

Why the double standard?

Stapes
Allen Browne - 27 Feb 2007 23:48 GMT
Try including the ".Form" bit to distinguish between the subform control and
the form in that control:

[Forms]![FM_MainDetails]![FMS_Boat_subform].Form![TM_JobDetails_subform].LinkMasterFields
= "jobno"

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

If that still doesn't work, open the main form in design view, and check the
Name property of the subform control. The name can be different than the
name of the form loaded into it (its SourceObject.)

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hi
>
[quoted text clipped - 19 lines]
>
> Stapes
Stapes - 28 Feb 2007 09:29 GMT
Hi

I tried that solution - putting .Form. between Form & subform. It
didn't work. I don't think the problem is with referencing the
LinkChild & LinkMaster fields, because the values are ending up in the
right place. What it is not finding is "jobno" which is a control on
FM_MainDetails. I moved my hidden control to the FMS_Boat_subform -
and it worked !!

Stapes
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.