title image


Smiley Alle DB-Objekte




Option Compare Database

Option Explicit



Function ObjekteAuflisten()

On Error GoTo Proc_Err



Dim dbs As DAO.Database

Dim qry As DAO.QueryDef

Dim tdf As DAO.TableDef

Dim ctn As DAO.Container

Dim i As Integer



Set dbs = CurrentDb()



'Alle Abfragen

Debug.Print "Abfragen"

For Each qry In dbs.QueryDefs

Debug.Print , qry.Name

Next qry



'Alle Tabellen

Debug.Print "Tabellen"

For Each tdf In dbs.TableDefs

Debug.Print , tdf.Name

Next tdf



'Alle Formulare

Debug.Print "Formulare"

For i = 0 To dbs.Containers("Forms").Documents.Count - 1

Debug.Print , dbs.Containers("Forms").Documents(i).Name

Next i



'Alle Berichte

Debug.Print "Berichte"

Set ctn = dbs.Containers("Reports")

For i = 0 To ctn.Documents.Count - 1

Debug.Print , ctn.Documents(i).Name

Next i



'Alle Makros

Debug.Print "Makros"

Set ctn = dbs.Containers("Scripts")

For i = 0 To ctn.Documents.Count - 1

Debug.Print , ctn.Documents(i).Name

Next i



'Alle Module

Debug.Print "Module"

Set ctn = dbs.Containers("Modules")

For i = 0 To ctn.Documents.Count - 1

Debug.Print , ctn.Documents(i).Name

Next i



Proc_Exit:

Set dbs = Nothing

Exit Function



Proc_Err:

MsgBox Err.Description, vbCritical, "Fehler " & Err.Number

Resume Proc_Exit



End Function




Schöne Grüße
Ralf

(Ich verwende: Windows XP / Office XP)


Meine Links:
Meine Homepage
DBWiki
The Access Web


geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: