Re: Querydef



Thanks, but I think this will give me a listing of the queries in an mdb.
What I want to do is list the tables and/or queries that comprise a single
query.


"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> wrote in message
news:ePffFXGyIHA.4772@xxxxxxxxxxxxxxxxxxxxxxx
OpenRecordset() on something like this:

SELECT MSysObjects.Name, MSysObjects.Type
FROM MSysObjects
WHERE (MSysObjects.Type In (1,4,5,6))
AND (Not (MSysObjects.Name Like "MSys*"
Or MSysObjects.Name Like "~*"))
ORDER BY MSysObjects.Name;

Alternatively, loop through the TableDefs and QueryDefs.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"JimP" <jpockmire@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:t9KdnXhGD7e8DdTVnZ2dnUVZ_tXinZ2d@xxxxxxxxxxxxxx
Is it possible to list all of the tables/queries in a query via code?



.



Relevant Pages

  • SELECT * or list fields?
    ... I have heard that a listing of all fields instead of SELECT * should be used ... in queries, but then I have seen SELECT * used by people I would regard as ... consensus apply to SQL that is used in VBA? ...
    (microsoft.public.access.queries)
  • How do I print the Navigation Pane Contents w/ Dates Created / Modified
    ... or what is the VBA code or Utility which will give me a neat ... listing of Tables, Queries, Reports, Forms etc... ...
    (comp.databases.ms-access)
  • Merge not displaying queries
    ... I'm using Access 2003 and have a merge document set up. ... queries, but when I merge it's just listing a few queries. ... all the queries--instead of selecting Access Database, it was DDE or ...
    (microsoft.public.access.queries)
  • How to do...
    ... I need to build a form with a list box listing all my queries (form header). ... These queries are to be loaded in detail section in a spreadsheet format. ...
    (microsoft.public.access.forms)
  • Re: A2007 ADPs
    ... queries with an MDB and these are ideal for complex queries and reports ... I admit I had forgotten about this feature, not having done much MDB work ... On many occasions, it's with reports ... Please convince me that Linked Tables work as well as an ADP. ...
    (microsoft.public.access.adp.sqlserver)

Loading