Manuel,

This should work to limit your results to a list of
tables starting with "Tbl_S"

Public Sub ListTables()

    Dim i As Integer
    
    On Error Resume Next
    
    For i = 0 To CurrentDb.TableDefs.Count
        If CurrentDb.TableDefs(i).Name Like "Tbl_S*"
Then
            Debug.Print "Table: " &
CurrentDb.TableDefs(i).Name
        End If
    Next
End Sub

Mike

--- Manuel Tejada <[EMAIL PROTECTED]>
wrote:

> 
> 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    NextEnd
> Sub
> 
> Thanks,
> 
> Manuel
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 


Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to