Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to list the database tables in a list box

Status
Not open for further replies.

SweetDot

Technical User
Jan 19, 2004
65
US
Hi,
I want to have a list box listing some of the database tables. Is there any way to list just some of the tables in the access database?

thanks in advance
 
Try this SQL

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

David
 
wow, so complicated.
thanks..i'll see how it turns out
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top