UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> How Many Queries, Form, Table And Reports In Database, Any Versions    
 
   
Quinto1
post Jan 19 2018, 12:43 PM
Post#1



Posts: 90
Joined: 23-April 16



Is it possible to run a report that will give me how many tables, reports, forms and queries are in a database without counting each category?
Thanks
Go to the top of the page
 
DanielPineault
post Jan 19 2018, 01:05 PM
Post#2


UtterAccess VIP
Posts: 7,011
Joined: 30-June 11



You can build a very simple query, see http://www.devhut.net/2010/06/12/ms-access...tabase-objects/, to get a count (breakdown or not). The criteria depend on you, (local tables only, linked tables, ...) all the info is in link.
Go to the top of the page
 
DanielPineault
post Jan 19 2018, 01:12 PM
Post#3


UtterAccess VIP
Posts: 7,011
Joined: 30-June 11



Perhaps something like this is what you are after

SQL
SELECT Count(MsysObjects.Name) AS [Count of Database Objects]
FROM MsysObjects WHERE (((MsysObjects.Name) Not Like "~*" And (MsysObjects.Name) Not Like "MSys*") AND ((MsysObjects.Type) In (1,4,6,5,-32768,-32764,-32766,-32761)));


or for a breakdown

SQL
SELECT MsysObjects.Type, Count(MsysObjects.Name) AS [Count of Database Objects]
FROM MsysObjects WHERE (((MsysObjects.Name) Not Like "~*" And (MsysObjects.Name) Not Like "MSys*"))
GROUP BY MsysObjects.Type
HAVING (((MsysObjects.Type) In (1,4,6,5,-32768,-32764,-32766,-32761)))
ORDER BY MsysObjects.Type;



Go to the top of the page
 
Quinto1
post Jan 19 2018, 10:08 PM
Post#4



Posts: 90
Joined: 23-April 16



I really did not think there was an answer but I took a shot at it.
Both code worked.
Can you tell me what the numbers in type field mean?
Thank you again
Quinto
Attached File(s)
Attached File  ObjectsNo.pdf ( 15.37K )Number of downloads: 2
 
Go to the top of the page
 
DanielPineault
post Jan 20 2018, 06:17 AM
Post#5


UtterAccess VIP
Posts: 7,011
Joined: 30-June 11



There's a convertion table provided in the original article I recommended to you, http://www.devhut.net/2010/06/12/ms-access...tabase-objects/



Tables (Local)1

Tables (Linked using ODBC)4

Tables (Linked)6

Queries5

Forms-32768

Reports-32764

Macros-32766

Modules-32761




Go to the top of the page
 
Quinto1
post Jan 22 2018, 12:25 AM
Post#6



Posts: 90
Joined: 23-April 16



Thank you very much
Quinto
Go to the top of the page
 
DanielPineault
post Jan 22 2018, 09:01 AM
Post#7


UtterAccess VIP
Posts: 7,011
Joined: 30-June 11



thumbup.gif
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    13th December 2019 - 12:15 AM