Setting LinkMasterField, LinkChildField properties for a subreport with VBA

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
 
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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top