G Guest Jan 12, 2005 #1 Could you help me with code to loop thru the current database to identify all the table names in that database? Thank you.
Could you help me with code to loop thru the current database to identify all the table names in that database? Thank you.
D Dirk Goldgar Jan 12, 2005 #2 Wylie C said: Could you help me with code to loop thru the current database to identify all the table names in that database? Thank you. Click to expand... If you're using Access 2000 or later: Dim ao As AccessObject For Each ao In CurrentData.AllTables If Left(ao.Name, 4) <> "MSys" Then Debug.Print ao.Name End If Next ao If you're using Access 97: Dim db As Database Dim tdf As TableDef Set db = CurrentDb For Each tdf In db.TableDefs If Left(tdf.Name, 4) <> "MSys" Then Debug.Print tdf.Name End If Next tdf Set db = Nothing
Wylie C said: Could you help me with code to loop thru the current database to identify all the table names in that database? Thank you. Click to expand... If you're using Access 2000 or later: Dim ao As AccessObject For Each ao In CurrentData.AllTables If Left(ao.Name, 4) <> "MSys" Then Debug.Print ao.Name End If Next ao If you're using Access 97: Dim db As Database Dim tdf As TableDef Set db = CurrentDb For Each tdf In db.TableDefs If Left(tdf.Name, 4) <> "MSys" Then Debug.Print tdf.Name End If Next tdf Set db = Nothing