Discussion Locked

How to List Access Tables in ComboBox

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need to create a ComboBox that lists all of the tables in the Access 2000 database that I'm using so a user and pick a specific table to run a report for.
I know it can be done but I can't find the code I "borrowed" before to do this.

5 replies

by peyison

This should return all tables (not linked tables):

Select Name From MSysObjects
Where Type=1 And Flags=0

If you want to include linked tables, try:

Select Name From MSysObjects
Where (Type=1 And Flags=0) or (Type=6)

Hope this helps.

by donq

Peyison's answer is wright-on. Why don't you approve it and award him the points?

This discussion is closed to new replies.