Rabu, 11 April 2018

Re: [MS_AccessPros] Report Sources

 

To be a little more specific, I use the built in Database Documenter and select all of the objects and properties I want to report. This actually creates a table (doc_tblObjects) in a wizard database C:\Users\MyLoginHere\AppData\Roaming\Microsoft\Access\ACWZUSR12.ACCDU.


You can link to the table and create a query like this to get the report/form name, Control Type, Control Name, Caption, Control Source, and if it Visible:


TRANSFORM First(doc_tblObjects_2.Extra1) AS FirstOfExtra1
SELECT doc_tblObjects.TypeID AS [Object Type], doc_tblObjects.Name AS FormReport, doc_tblObjects_1.Extra1 AS [Control Type], doc_tblObjects_1.Name AS ControlName
FROM doc_tblObjects AS doc_tblObjects_2 INNER JOIN (doc_tblObjects INNER JOIN doc_tblObjects AS doc_tblObjects_1 ON doc_tblObjects.ID = doc_tblObjects_1.ParentID) ON doc_tblObjects_2.ParentID = doc_tblObjects_1.ID
WHERE (((doc_tblObjects.TypeID) In (2,3)) AND ((doc_tblObjects_1.TypeID)=33) AND ((doc_tblObjects_2.Name) In ("ControlSource:","Visible:","caption:")) AND ((doc_tblObjects_2.Extra1) Is Not Null))
GROUP BY doc_tblObjects.TypeID, doc_tblObjects.Name, doc_tblObjects_1.Extra1, doc_tblObjects_1.Name
PIVOT doc_tblObjects_2.Name;

To get all of the tables and field names with types and sizes:

SELECT doc_tblObjects.Name AS TableName, doc_tblObjects_1.Name AS FieldName, doc_tblObjects_1.Extra2 AS FieldType, doc_tblObjects_1.Extra3 AS FieldSize
FROM doc_tblObjects INNER JOIN doc_tblObjects AS doc_tblObjects_1 ON doc_tblObjects.ID = doc_tblObjects_1.ParentID
WHERE (((doc_tblObjects_1.TypeID)=11));



Regards,

Duane






From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Tuesday, April 10, 2018 6:58 PM
To: MS_Access_Professionals@yahoogroups com
Subject: Re: [MS_AccessPros] Report Sources
 


No easy solution.  I use the database documenter.

Duane



On April 10, 2018, at 6:24 PM, "luvmymelody@yahoo.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com> wrote:



Hello all,


My boss just asked me to find all reports with a certain field. I was trying to get the source like I do with the SQL queries. like below. But I am unable to change the objects to Reports instead of queries. Is there a quick way of doing this? I tried Crystals Analyzer but it would be easier to run a query to get the sources instead of the other reports.


Thank you

Jim Wagner


SELECT msysObjects.Name, GetSQL([Name]) AS [SQL], Left([SQL],(InStr(1,[SQL]," ")-1)) AS [Query Type], "PeopleSoft Datawarehouse" AS [Database Name]
FROM msysObjects
WHERE (((msysObjects.Name) Not Like '~*') AND ((msysObjects.type)=5));


and the function is like this


Option Compare Database

Public Function GetSQL(strQueryName As String)

    GetSQL = CurrentDb.QueryDefs(strQueryName).SQL

End Function








__._,_.___

Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar