How to add linked tables objects to this access query output?

T

tonyck

Hi everybody. I got a query that displays object name and object type o
access 2000 db. Unfortuenly it dose not display the linked table
objects(linked to tables in acccess 2000 db). could an expert tell m
how i can fix this query so it displays linked tables object a
well.Thanks




Code
-------------------

SELECT MsysObjects.Name AS ObjectName, IIf([type]=1 Or [type]=6,"Table","Query") AS ObjectType
FROM MsysObjects
WHERE (((Left$([Name],1))<>"~") AND ((Left$([Name],4))<>"Msys") AND ((MsysObjects.Type)=1 Or (MsysObjects.Type)=5 Or (MsysObjects.Type)=6) AND ((MsysObjects.Flags)=2097152 Or (MsysObjects.Flags)=128 Or (MsysObjects.Flags)=0 Or (MsysObjects.Flags)=16))
ORDER BY MsysObjects.Name;
 
M

Marshall Barton

tonyck said:
Hi everybody. I got a query that displays object name and object type of
access 2000 db. Unfortuenly it dose not display the linked tables
objects(linked to tables in acccess 2000 db). could an expert tell me
how i can fix this query so it displays linked tables object as
well.


Code:
--------------------
SELECT MsysObjects.Name AS ObjectName, IIf([type]=1 Or [type]=6,"Table","Query") AS ObjectType
FROM MsysObjects
WHERE (((Left$([Name],1))<>"~") AND ((Left$([Name],4))<>"Msys") AND ((MsysObjects.Type)=1 Or (MsysObjects.Type)=5 Or (MsysObjects.Type)=6) AND ((MsysObjects.Flags)=2097152 Or (MsysObjects.Flags)=128 Or (MsysObjects.Flags)=0 Or (MsysObjects.Flags)=16))
ORDER BY MsysObjects.Name;


Linked tables are type 6, which you're already checking for.
I don't have a complete understanding of the Flags field,
but I suspect that your Flags criteria should be discarded
or, at least, modified.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top