Maybe this is a headstart to where you are going.

 Good Luck


 Hal


 Public Sub ListTables()

     Dim i As Integer


      Dim j as Integer
     Dim strTableName() as String



     On Error Resume Next
      redim strTableName(CurrentDb.TableDefs.Count - 1) 'Maximum number of
 possible matches


     j=0
     For i = 0 To CurrentDb.TableDefs.Count - 1
        If Left(CurrentDb.TableDefs(i).Name,5) = "tbl_S" Then


            strTableName(j) = CurrentDb.TableDefs(i).Name


            j=j+1


         End If


            Debug.Print "Table: " & CurrentDb.TableDefs(i).Name
     Next


      'Add code here to output the strTableName array
 End Sub

Hal McGee
Engineering Data Manager
Group Engineering - Process and Compliance
Seating Products Group
B/E Aerospace
Winston-Salem, NC


                                                                           
             Manuel Tejada                                                 
             <visualbprogramme                                             
             [EMAIL PROTECTED]>                                              To 
             Sent by:                  AccessDevelopers@yahoogroups.com    
             AccessDevelopers@                                          cc 
             yahoogroups.com                                               
                                                                   Subject 
                                       [AccessDevelopers] Retrieving       
             08/31/2005 10:26          table's names                       
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
             AccessDevelopers@                                             
              yahoogroups.com                                              
                                                                           
                                                                           




 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


Please zip all files prior to uploading to Files section.



                                                            SPONSORED LINKS


                                                                  
 Microsoft access    Microsoft access help  Microsoft access      
 developer                                  database              
                                                                  
 Microsoft access    Microsoft access       Microsoft access      
 training            training course        programming           
                                                                  



                            YAHOO! GROUPS LINKS

       Visit your group "AccessDevelopers" on the web.

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

       Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/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