473,320 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

List of Record Souce wrt all Forms & Reports

In my MS database I am interested to store list of all Record Source used in all created forms and reports.

e.g Form1-------Querya
Form2-------Queryc
Report1-----Queryb
Sep 17 '14 #1
2 936
twinnyfo
3,653 Expert Mod 2GB
Here are a couple quickie functions that can get you started:

Expand|Select|Wrap|Line Numbers
  1. Public Function FormRecordSource()
  2. On Error GoTo EH
  3.     Dim db As Object
  4.     Dim oAO As AccessObject
  5.     Dim frm As Form
  6.     Set db = Application.CurrentProject
  7.     For Each oAO In db.AllForms
  8.         DoCmd.OpenForm oAO.Name, acDesign
  9.         Debug.Print oAO.Name, Forms(oAO.Name).RecordSource
  10.         DoCmd.Close acForm, oAO.Name, acSaveNo
  11.     Next
  12.     Set oAO = Nothing
  13.     Set frm = Nothing
  14.     Exit Function
  15. EH:
  16.     Resume Next
  17. End Function
  18. Public Function ReportRecordSource()
  19. On Error GoTo EH
  20.     Dim db As Object
  21.     Dim oAO As AccessObject
  22.     Dim rpt As Report
  23.     Set db = Application.CurrentProject
  24.     For Each oAO In db.AllReports
  25.         DoCmd.OpenReport oAO.Name, acDesign
  26.         Debug.Print oAO.Name, Reports(oAO.Name).RecordSource
  27.         DoCmd.Close acReport, oAO.Name, acSaveNo
  28.     Next
  29.     Set oAO = Nothing
  30.     Set rpt = Nothing
  31.     Exit Function
  32. EH:
  33.     Resume Next
  34. End Function
Hope this hepps!
Sep 17 '14 #2
NeoPa
32,556 Expert Mod 16PB
You may Log Code and Property References can help you with that.
Sep 18 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Timppa | last post by:
Hi, I have Access 2000 and now I'm converting .mdb database to .adp and Sql Server 2000. In old .mdb application I have a query which handles msysobjects table (reading forms and reports...
1
by: Nicolae Fieraru | last post by:
Hi All, I am working on an Access 2000 project where it was necessary to rename some fields in a table or to delete some fields and to recreate new ones. Now there are many forms and reports...
2
by: misscrf | last post by:
I have a search form that is great. I have modified it in such a way, that when search results come up I can bring it back to a useful spot, say an entry form or a report. Here is my lemon (...
2
by: B. L via AccessMonster.com | last post by:
I have a Database with a Simple Switch board and multiple reports and forms. All of a sudden When i go and open up the database it says it can't find my forms or reports, but the tables and quiries...
0
by: Mark 123 | last post by:
For those of you that are using the Access 2007 Beta, can I ask, comparing Access 97: Is there still a 755 control limit for forms and reports?
1
by: mbongarala | last post by:
I've been hunting for some basic introduction on Forms and Reports..No matter how I search the sites, I've failed to find relevant information. Could anyone pls let me know of a book or a link I...
4
by: aflat362 | last post by:
If you look at this page on relational database design: http://r937.com/relational.html And scroll down to the "Many-to-Many Relationships" Section you will see a common database structure. ...
1
by: Bob Simon | last post by:
I'm trying to find what what forms and reports use a particular field, because I'm replacing it with another field. How can I search forms and reports for a field name?
6
by: Sifiso | last post by:
I would like to know how to uninstall the Oracle forms and reports because it doesn't give you an option to to so even in the control Panel it's not there. Thanks Sifiso
8
by: Bellina | last post by:
Hi, I am a newbie using Access 2013. I have a database with information of our group of companies, list of banks and the list of bank accounts these companies have with the respective banks. The...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.