MS Access– Sample Queries

about the background image...

Retrieving the names of DB objects (tables, macros, etc.)

Retrieving the names of DB objects (tables, macros, etc.)

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

Other objects:
SELECT MSysObjects.Name FROM MsysObjects WHERE (Left$([Name],1)<>"~") AND (MSysObjects.Type)=xxx ORDER BY MSysObjects.Name;
where xxx = -32768 for Forms; -32766 for Macros; -32764 for Reports; -32761 for Modules; 5 for Queries


Last updated 04-12-02 21.59.15