Export Record Source of reports/forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vavc1980
    New Member
    • Feb 2008
    • 25

    Export Record Source of reports/forms

    Hello all,

    Is there any way to export to a text file the Record Source (or any other property value) of a form or report?
    Currently I'm able to export the code in the modules and the code of reports and forms, but I'd like to export also that property.

    Any ideas? I appreciate the help
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Hi, there.

    The following code will output all properties of a form (let us say [frmSomeForm]) to VBA immediate window.
    [code=vb]
    Public Sub FormProperties( )

    On Error Resume Next
    For Each p In Form_frmSomeFor m.Properties
    Debug.Print p.Name, p.Value
    Next

    End Sub
    [/code]

    Kind regards,
    Fish

    Comment

    • Minion
      Recognized Expert New Member
      • Dec 2007
      • 108

      #3
      There is a tool called Documenter that is available when selecting the main DB window. This will allow you to run a series of reports about the components contained in your database.

      Hope this helps.

      - Minion -

      Comment

      • vavc1980
        New Member
        • Feb 2008
        • 25

        #4
        Thank you for the answers.

        FishVal:
        That worked, at first I didn't think how to go through all the forms and reports, but then I remember that that information is in the Msysobjects table, so I read it to get all the form/report names I needed.

        Minion:
        I didn't remember about the documenter option, I think I used it some time ago. I tried it now, selecting the minimum options, but the problem is that it gives me like 30 something pages for 14 reports that I have on my DB right now (didn't used it for the forms).
        The documenter gives me much more information that I need, which is only the recordsource property.
        Using vba code I create a single text file for only the reports/forms with data in the recordsource property.

        Thank you both for the quick answers both were helpful.

        Comment

        Working...