change subreport source object

J

johnlute

Access 2003/Win 2000

I'm trying to get this to work:
Private Sub Report_Open(Cancel As Integer)
Me.srptPKPhysicalAttributes.SourceObject = "srptPK" & Me.Type &
"PhysicalAttributes"
Me.srptPKMaterialAttributes.SourceObject = "srptPK" & Me.Type &
"MaterialAttributes"
Me.srptPKFinishingAttributes.SourceObject = "srptPK" & Me.Type &
"FinishingAttributes"
Me.srptPKPerformanceAttributes.SourceObject = "srptPK" & Me.Type &
"PerformanceAttributes"

End Sub

The report refuses to open. Does anyone see anything wrong?

The peculiar &Me.Type was suggested by Marshall Barton for use in the
OnChange Event of a tab control in a particular form. It works fine
for the form but perhaps not in the report...?

Thanks!
 

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