Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] - نسخه متنی

Alison Balter

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



Using the DAO Containers Collection


A Container object maintains information about saved Database objects. The types of objects in the Containers collection are data access pages, databases, tables (including queries), relationships, system relationships, forms, reports, scripts (macros), and modules. The Container object is responsible for letting Jet know about the user interface objects. Databases, tables, relationships, and system relationships have Jet as their parent object. Forms, reports, scripts, and modules have the Access application as their parent object.

Each Container object possesses a collection of Document objects. These are the actual forms, reports, and other objects that are part of your database. The Document objects contain only summary information about each object (date created, owner, and so on); they do not contain the actual data of the objects. To refer to a particular document within a container, you must use one of two techniques:

Containers("Name")

or

Containers!Name

To list each Container object and its associated Document objects, you need to use the code shown in Listing 14.74.

Listing 14.74 Listing Each Container Object and Its Associated Document Objects

Sub ListAllDBObjects()
Dim db As dao.Database
Dim con As dao.Container
Dim doc As dao.Document
'Point the Database object at a reference to the
'current database
Set db = CurrentDb
'Loop through each Container object in the
'Containers collection, printing the name of each object
For Each con In db.Containers
Debug.Print "*** " & con.Name & " ***"
'Loop through each Document object in the
'Documents collection of the Container,
'printing its name
For Each doc In con.Documents
Debug.Print doc.Name
Next doc
Next con
End Sub

This code loops through all the documents in all the containers, listing each one.


/ 544