report showing record source of forms and reports

  • Thread starter Thread starter susanhull
  • Start date Start date
S

susanhull

Is there a tool in Access that creates a report showing the record
source for my reports and forms? Or is there a way to generate a
report that shows if a query is being used in a report or form?

Thanks in advance for your advice.

Susan
 
There's a built-in documenter that provides some info on the forms/reports:
Tools | Analyze | Documenter

Jeff Conrad has a more extensive documenter here:
http://home.bendbroadband.com/conradsystems/accessjunkie/csdtools.html

If you want to code it (assuming Access 2000 or later), loop through the
AllForms or AllReports collection. This kind of thing:

Public Function ShowRecordSource()
Dim accobj As AccessObject
Dim strDoc As String

For Each accobj In CurrentProject.AllForms
strDoc = accobj.Name
If accobj.IsLoaded Then
Debug.Print strDoc, Forms(strDoc).RecordSource
Else
DoCmd.OpenForm strDoc, acDesign, WindowMode:=acHidden
Debug.Print strDoc, Forms(strDoc).RecordSource
DoCmd.Close acForm, strDoc
End If
Next
End Function
 

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

Back
Top