Change the For loop to
For i = 0 To CurrentDb.TableDefs.Count – 1
If( LEFT(CurrentDB.TableDefs(i),5) = “tbl_S” then
Debug.Print "Table: " & CurrentDb.TableDefs(i).Name
End if
Next
Lava
------------------------------------------------
Lava
Boggavarapu
Lava
Trading Inc.
95
Morton Street, 6th Floor
New
York, NY 10014
Tel
212.519.9371
Fax
212.519.9283
Mobile
732.668.2935
www.lavatrading.com
-----Original Message-----
From:
AccessDevelopers@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Manuel Tejada
Sent: Wednesday, August 31, 2005
10:27 AM
To:
AccessDevelopers@yahoogroups.com
Subject: [AccessDevelopers]
Retrieving table's names
Hi all,
How can I retrieve the tables' name of the current
database? Let say I want all the tables starting with tbl_S. I found this code,
I would like to modify it to accomplish what I want. Any idea?
Public Sub ListTables()
Dim i As Integer
On Error Resume Next
For i = 0 To CurrentDb.TableDefs.Count - 1
Debug.Print "Table: " & CurrentDb.TableDefs(i).Name
Next
End Sub
Thanks,
Manuel
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
The information contained in this message and any attachments (the "Message") is intended for specific individual(s), and may be confidential or proprietary. If you are not the intended recipient, please notify the sender immediately, delete this Message and do not disclose. Messages are not secure or error free and can contain viruses and the sender is not liable for any of these occurrences. The sender reserves the right to monitor, record and retain Messages.
Please zip all files prior to uploading to Files section.
SPONSORED LINKS
YAHOO! GROUPS LINKS