Summary: How to use a query to get the name of a database object (Query/form/table/Report/module/macro)
Body:
(q): How do I use a query to get the name of a database object (Query/form/table/Report/module/macro)?
(a): Access system table Msysobjects contains a list of database objects, though not documented in the document, you can still query it to get what you want.
Note: Do not intentionally or unintentionally modify any access system tables, otherwise unexpected situations may occur.
Use the following SQL statement to get what you want
Inquire:
SELECT msysobjects.name from Msysobjects WHERE (left$ ([name],1) <> "~") and (Msysobjects.type) =5 the ORDER by Msysobjects.name;
Forms: SELECT msysobjects.name from Msysobjects WHERE (left$ ([name],1) <> "~") and (Msysobjects.type) =-32768 the ORDER by MS Ysobjects.name;
Table: SELECT msysobjects.name from Msysobjects WHERE (left$ ([name],1) <> "~") and (left$ ([name],4) <> "Msys") and ( Msysobjects.type) =1 order by Msysobjects.name;
Report:
SELECT msysobjects.name from Msysobjects WHERE (left$ ([name],1) <> "~") and (Msysobjects.type) = -32764 ORDER by Msyso Bjects. Name;
Module: SELECT msysobjects.name from Msysobjects WHERE (left$ ([name],1) <> "~") and (Msysobjects.type) = -32761 ORDER by MS Ysobjects.name;
Macros: SELECT msysobjects.name from Msysobjects WHERE (left$ ([name],1) <> "~") and (Msysobjects.type) = -32766 ORDER by MSy Sobjects.name;