Setting LinkMasterField, LinkChildField properties for a subreport with VBA

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

I'm trying to set the LinkMasterField and LinkChildField properties of
a subreport with VBA (using Access 2003), but I'm encountering the
error:

"Object does not support this property or method".

Specifically, in the On Open event of the master report, I have code
that tries to set these properties for a subreport named srpPSLR. The
relevant line of code for LinkMasterField reads:

Me.srpPSLR.LinkMasterField = "MyFieldName"

And there's a matching line for LinkChildField. Is there a syntax
problem here? I've seen referces to setting these properties with
VBA before, but this approach isn't working.

Suggestions would be much appreciated!

- Jon
 
I'm trying to set the LinkMasterField and LinkChildField properties of
a subreport with VBA (using Access 2003), but I'm encountering the
error:

"Object does not support this property or method".

Specifically, in the On Open event of the master report, I have code
that tries to set these properties for a subreport named srpPSLR. The
relevant line of code for LinkMasterField reads:

Me.srpPSLR.LinkMasterField = "MyFieldName"

And there's a matching line for LinkChildField. Is there a syntax
problem here? I've seen referces to setting these properties with
VBA before, but this approach isn't working.

Suggestions would be much appreciated!

- Jon

Why, yes there was a syntax error. The property isn't:

LinkMasterField

it's

LinkMasterFields

Fixed the problem; hopefully this will help others who may make the
same mistake!

- Jon
 
Back
Top