Hi Dan,
Glad you liked the Add-In.
As Doug already mentioned, there is no need to save a list of your queries in a table; just query
the System Tables. Doug already provided the SQL for queries, but here is some SQL to get a list of
the other database objects. Just base a combo box on these SQL statements.
--For Queries use:
SELECT MsysObjects.Name
FROM MsysObjects
WHERE (((Left$([Name],1))<>"~") AND ((MsysObjects.Type)=5))
ORDER BY MsysObjects.Name;
--For Forms use:
SELECT MsysObjects.Name
FROM MsysObjects
WHERE (((Left$([Name],1))<>"~") AND ((MsysObjects.Type)=-32768))
ORDER BY MsysObjects.Name;
--For Reports use:
SELECT MsysObjects.Name
FROM MsysObjects
WHERE (((Left$([Name],1))<>"~") AND ((MsysObjects.Type)=-32764))
ORDER BY MsysObjects.Name;
--For Macros use:
SELECT MsysObjects.Name
FROM MsysObjects
WHERE (((Left$([Name],1))<>"~") AND ((MsysObjects.Type)=-32766))
ORDER BY MsysObjects.Name;
--For Tables use:
SELECT MsysObjects.Name
FROM MsysObjects
WHERE (((Left$([Name],1))<>"~") AND ((Left$([Name],4))<>"Msys") AND ((MsysObjects.Type)=1))
ORDER BY MsysObjects.Name;
--For Modules use:
SELECT MsysObjects.Name
FROM MsysObjects
WHERE (((Left$([Name],1))<>"~") AND ((MsysObjects.Type)=-32761))
ORDER BY MsysObjects.Name;
Hope that helps.
--
Jeff Conrad
Access Junkie
Bend, Oregon
Thanks Jeff,
You're right, that is sweet and simple to use. However it doesn't
accomplish my ultimate goal. I'm trying to create a list of query names as
the list source for a drop down box. Ultimately I'd like it to be fully
dynamic and populate as the form opens. I was hoping to store the data in a
table that I can write SQL against.
objects I
would suggest you try my will
create a nice report of all in
your database that you can a
couple of seconds. Table
Documentor" that will ones)
grabbing the information report
entirely in code, saves it, post
it on his web site where a
problem if I sent you a need.
There is one version for feature
been from
the