Solved

Loop through All forms recordsources

Posted on 2008-10-13
1
443 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

776 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