Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to tell if a report uses sub reports?

How to tell if a report uses sub reports?

How to tell if a report uses sub reports?

Is there a way to find out if a report uses sub reports?
I have a sub report that I modified but I need to know what reports use it. [Without having to open each report in the reports object]

I was thinking that there may be a way to iterate through each report and print its children (report names), but I'm not a ware if there is a way.



RE: How to tell if a report uses sub reports?

take a look @ object dependencies

RE: How to tell if a report uses sub reports?

Object dependencies may work, but I found on a really big application you will get too much additional information.
mdbdoc provides a ton of this type of information but not exactly what you are looking for.

This code will print out the answer showing where all subreports are used.

CODE -->

Public Sub WhereUsed()
  Dim rptObj As Access.AccessObject
  Dim rpt As Access.Report
  Dim ctl As Access.Control
  For Each rptObj In CurrentProject.AllReports
    DoCmd.OpenReport rptObj.Name, acViewDesign
    Set rpt = Reports(rptObj.Name)
      For Each ctl In rpt
        If ctl.ControlType = acSubform Then
          Debug.Print ctl.SourceObject; " is used by " & rpt.Name
        End If
        Next ctl
      DoCmd.Close acReport, rptObj.Name
    Next rptObj
End Sub 

RE: How to tell if a report uses sub reports?


Thank you.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close