views:

25

answers:

2

I'm quering the table MsysObjects for making a list of the objects in my database:

SELECT MsysObjects.Name, MsysObjects.Type
FROM MsysObjects
WHERE (((Left$([Name],1))<>'~') AND ((Left$([Name],4))<>'Msys'))
ORDER BY MsysObjects.Name;

I know these values:

-32768 = Form
-32766 = Macro
-32764 = Report
-32761 = Module
1 = Table
5 = Query
6 = Linked Table

But what about the values -32758, -32757 and 3? Where do they stand for? Cannot find it on the web.

A: 
Type   TypeDesc
-32768  Form
-32766  Macro
-32764  Reports
-32761  Module
-32758  Users
-32757  Database Document
-32756  Data Access Pages
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
8   SubDataSheets

-- http://www.access-programmers.co.uk/forums/showthread.php?t=103811

Remou
Thanks! But should there be no "offical" information from Microsoft somewhere?
waanders
As far as I recall, MS does not want you poking around in system tables, it can do really horrible things to your DB if you do not know what you are doing. They are undocumented and people used always to post a warning when mentioning them. However, that seems to have stopped.
Remou
Well, for one, MS has promised (according to Michael Kaplan) that once something in a system table is used for something, it will always be supported. How you know the difference between used and unused objects, I haven't a clue, but there it is.
David-W-Fenton
A: 

I'd tend to avoid mucking about with the system tables. For one, temporary objects can show up there and confuse things. To get the same information, you can use:

  CurrentDB.TableDefs
  CurrentDB.QueryDefs
  CurrentProject.AllForms
  CurrentProject.AllReports
  CurrentProject.AllMacros

That's the documented way to get the information. Depending on undocumented system tables is not recommended.

David-W-Fenton