Changing LinkChildFields in code

  • Thread starter Thread starter Russell
  • Start date Start date
R

Russell

I have tried running the following code line in the
Report_Open event:

Me.[chartname].Properties!LinkChildFields = [some string
value]

or

Me.[chartname].Properties("LinkChildFields") = [some
string value]

MS Help states that LinkChildFields property applies to
SubForm and ObjectFrame objects only, although the
property does exist for Charts and SubReports. But if I
alter my chart to an ObjectFrame and use it in the above
code I get the same error. Further, it fails only at
runtime, if I step through the code at design time, it
does not fail. If I open the Report in design mode, it
does not fail. MS Help also states that the property can
be changed in report design mode or in the Report_Open
event.

Can anyone help?
 
Solved my own issue, the LinkChildFields and
LinkMasterFields can only be altered in code only when
used by the SubForm and SubReport objects. The Chart and
ObjectFrame objects, although they have these properties,
will error (2455) when you alter them in the Form_Open or
Report_Open events.

This is contrary to MS Help.
 
Back
Top