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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List available tables 2

Status
Not open for further replies.

irishjoe

Programmer
Aug 5, 2002
76
AU
Hi,

Does anyone know how to list the tables that are in your database?
I would like to fill up a listbox with the names of all the tables in my database.
I remember seeing someone do something similar ages ago but I cant find it again.

Any help would be appreciated.
Joe.
 
How are ya irishjoe . . .

Copy/paste the following to the [blue]RowSource[/blue] of the listbox. Its a single sorted column of the names and includes linked tables:
Code:
[blue]SELECT Name FROM MSysObjects WHERE (((Left([Name],4)<>"MSys") AND (Type=1)) OR (Type=6)) ORDER BY Name;[/blue]

Calvin.gif
See Ya! . . . . . .
 
Oh, that is the dogs balls!!! Cheers mate.

(You wouldn't believe how long I have looked for this!)
 
Just for completness:
SELECT Name FROM MSysObjects WHERE Left([Name],4)<>'MSys' AND Type In (1,[!]4[/!],6) ORDER BY Name

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top