dcx693 proposed a very nice method of performing this task using an ADO.
In the mean time, however, some other means to performing this were suggested using an SQL scripts and a query.
The query would have in its criteria field (by WayneRyan):
Name not like "MSys*" and Type = 1
and the SQL script would look something like this (by sconly):
sSql = "SELECT [Name] " & _
"FROM MSysObjects " & _
"WHERE Type=1 and Flags=0 " & _
"ORDER BY [Name];"
cmbProjects.RowSource = sSql
and you'd want to like to a table called tblObjectTypeCodes (by Pat):
Type TypeDesc
-32768 Form
-32766 Macro
-32764 Reports
-32761 Module
-32757 Access Object - ?
1 Table - Local Access Tables
2 Access Object - Database
3 Access Object - Containers
4 Table - Linked ODBC Tables
5 Queries
6 Table - Linked Access Tables
using the SQL (also by Pat):
SELECT tblObjectTypeCodes.TypeDesc, Count(*) AS ObjectCount
FROM MSysObjects LEFT JOIN tblObjectTypeCodes ON MSysObjects.Type = tblObjectTypeCodes.Type
GROUP BY tblObjectTypeCodes.TypeDesc;
But really, I don't know the syntax of an SQL script. I don' t know what's necessary and what's not, etc...
Could someone help tie these codes and techniques together for me?
In the mean time, however, some other means to performing this were suggested using an SQL scripts and a query.
The query would have in its criteria field (by WayneRyan):
Name not like "MSys*" and Type = 1
and the SQL script would look something like this (by sconly):
sSql = "SELECT [Name] " & _
"FROM MSysObjects " & _
"WHERE Type=1 and Flags=0 " & _
"ORDER BY [Name];"
cmbProjects.RowSource = sSql
and you'd want to like to a table called tblObjectTypeCodes (by Pat):
Type TypeDesc
-32768 Form
-32766 Macro
-32764 Reports
-32761 Module
-32757 Access Object - ?
1 Table - Local Access Tables
2 Access Object - Database
3 Access Object - Containers
4 Table - Linked ODBC Tables
5 Queries
6 Table - Linked Access Tables
using the SQL (also by Pat):
SELECT tblObjectTypeCodes.TypeDesc, Count(*) AS ObjectCount
FROM MSysObjects LEFT JOIN tblObjectTypeCodes ON MSysObjects.Type = tblObjectTypeCodes.Type
GROUP BY tblObjectTypeCodes.TypeDesc;
But really, I don't know the syntax of an SQL script. I don' t know what's necessary and what's not, etc...
Could someone help tie these codes and techniques together for me?