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 / New Users / August 2006

Tip: Looking for answers? Try searching our database.

Why linkchildfields code not work

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nova - 28 Jul 2006 10:22 GMT
My code From Cmdclick event is

Me.Plan.LinkMasterfields
Me!Plansub.form.Plan.LinkChildfields

Where Plan is control name on Main and Subform (Yes/No type)
when I click cmd button, It shows error message method not found
Where am I wrong
John Vinson - 28 Jul 2006 19:41 GMT
>My code From Cmdclick event is
>
[quoted text clipped - 4 lines]
>when I click cmd button, It shows error message method not found
>Where am I wrong

The Link Master field an Link Child Field are *properties* of a
Subform object. They aren't "methods" - they don't *do* anything.

They are available in code if you wish to change their values; for
example

Me.Plan.LinkMasterFields = "ID;PlanDate"

would set the Master Link Fields property of the subform control to
those values.

What are you trying to accomplish with this code?

                 John W. Vinson[MVP]
Nova - 01 Aug 2006 05:43 GMT
Thankyou for your answer but it still not work.

I already have links masterfield and childfields (YearBudg,MaintID: Same
control name in main and subform) by setting in design form and in some case
I want to add new link for other control in this case is Plan control.

This question is come from looking method to set value of Plan field (all
records in subform (continous view) by plan field in mainform.


> The Link Master field an Link Child Field are *properties* of a
> Subform object. They aren't "methods" - they don't *do* anything.
[quoted text clipped - 10 lines]
>
>                   John W. Vinson[MVP]    
Nova - 01 Aug 2006 06:16 GMT
more information
Control in mainform is unbound and same control name in subform
:YearBudg;MaintID;Plan
Thankyou
John Vinson - 01 Aug 2006 19:42 GMT
>Thankyou for your answer but it still not work.
>
[quoted text clipped - 4 lines]
>This question is come from looking method to set value of Plan field (all
>records in subform (continous view) by plan field in mainform.

You cannot change the value of a field in existing records using the
Master/Child Link Fields.

Also, the Subform *does not contain any data*. You cannot update "a
subform". The data is stored in a Table.

I believe what you need to do is to run an Update query to update the
desired records in the Subform's table.

                 John W. Vinson[MVP]
Nova - 02 Aug 2006 04:33 GMT
Update query is a good solution.

Thank you again for your Answer
 
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.