Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link Child/Master Fields 1

Status
Not open for further replies.

georgp

Technical User
Mar 28, 2002
96
US
Hi,

looks like I am posting many questions recently.
In the property sheet for a subform are the two items "Link child fields" and "Link master fields" in order to get the subform synchronized with the main form.
I want to change the links programmatically in VBA. I do not find anything in help and cannot figure it out.

Any hint/suggestion?

Thanks, georgp
 
Hi georgp,

Look at the LinkChildFields and LinkMasterFields Properties of the Subform Control. Be aware, though, that you can only change them on Form Open (or in Design Mode, of course).

Enjoy,
Tony
 
Thanks, Tony.

I have found that but it doesn't give any syntax example (I was not so claer in my first posting).

regards, georgp
 
Hi georgp,

They are just strings. Give them the same values you would type into the boxes in the Form Properties, for example ..

subformcontrolname.LinkMasterFields = "MasterCol1;MasterCol2"
subformcontrolname.LinkChildFields = "ChildCol1;ChildCol2"

Enjoy,
Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top