List access objects in a combo box

J

John W. Vinson

Is there a way to populate a combo box with the tables names in the database?

Clunky and undocumented: set its Rowsource to

SELECT MSysObjects.Name
FROM MSysObjects
WHERE ((([Flags] And 2)=0) AND ((MSysObjects.Type)=1))
ORDER BY MSysObjects.Name;

This works in 2003, no guarantees for other versions and I'm not altogether
comforatable with the Flags criterion either.

John W. Vinson [MVP]
 
P

PJFry

Worked well. Thanks.

I tend to be on the clunk side of coding these days, so it is a good match!

What do the Flags mean?

John W. Vinson said:
Is there a way to populate a combo box with the tables names in the database?

Clunky and undocumented: set its Rowsource to

SELECT MSysObjects.Name
FROM MSysObjects
WHERE ((([Flags] And 2)=0) AND ((MSysObjects.Type)=1))
ORDER BY MSysObjects.Name;

This works in 2003, no guarantees for other versions and I'm not altogether
comforatable with the Flags criterion either.

John W. Vinson [MVP]
 
J

John W. Vinson

Worked well. Thanks.

I tend to be on the clunk side of coding these days, so it is a good match!

What do the Flags mean?

That's one of the many undocumented aspects of these undocumented system
tables. Apparently from inspection of the tables, it's a bitmapped Long
Integer in which the 2's bit means it's a system table. The tables in the
database I tried all had 0 for tables I'd created, and 2 or other (huge) even
values for all the system tables.

John W. Vinson [MVP]
 

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