Getting a List of tables using VBA?? 
Author Message
 Getting a List of tables using VBA??

Is there a command that can be used to retrieve a list of tables
currently in the database? So I could automatically put them in a list
box on a form, for example?

Matt



Mon, 08 Jan 2001 03:00:00 GMT  
 Getting a List of tables using VBA??
Set the record-source of list/combo-box to:

Select Name From MSysObjects where ((Type=1 or Type=6) and Left$(Name,
1) <> "~") Order by Name;

Type = 1 is a table
Type = 6 is a linked table

HTH
LMH rogue(at)channel1 dot com |or| draupner (at) theglobe dot com
WWW http://www.channel1.com/users/rogue
FAQ:    http://members.forfree.at/~larsm
        http://home.att.net/~dashish
        http://www.hammerdata.com/Newsgrp
        http://www.channel1.com/users/rogue/Access/FAQ
        http://members.xoom.com/dashish
ICQ 10300112
Please limit questions/replies to news-group(s)...
Reply address may be foiled to fool spam-bots. Remove the obvious.
"Do it once, do it right. Cremate Kenny!"



Mon, 08 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting the list of Excel Sheet Names using VBA

2. Getting a list of table names using VBSQL?.?

3. Getting the total of a Table column, in MS Word using VBA

4. Copy fields from record in table A to record in table B using VBA

5. Getting value of list box in VBA

6. Getting a list of Import Specifications with VBA

7. Problem getting address list in VBA

8. Getting a list of tables and columns

9. Getting list of Access DB tables with VB

10. getting a list of table names

11. Getting a list of tables from a Access DB

12. Getting tables list from recordset?

 

 
Powered by phpBB® Forum Software