Solved

Loop through All forms recordsources

Posted on 2008-10-13
1
458 Views
Last Modified: 2013-11-05
Hi Experts

I have about 80 forms and most of them have a recordsource. How can i get the recordsource from each form?
0
Comment
Question by:DCRAPACCESS
1 Comment
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 22702051

Sub getFormRS()
Dim objAcc As AccessObject
    On Error Resume Next
    For Each objAcc In Application.CurrentProject.AllForms
        DoCmd.OpenForm objAcc.Name, acDesign
        Debug.Print Forms(objAcc.Name).RecordSource
        DoCmd.Close acForm, frm.Name, acSaveYes
    Next objAcc

End Sub
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question