![]() |
![]() |
テーブル系 - テーブル名とそのフィールド数を収集する | |
カレントデータベース内にあるテーブル名の一覧とともに、それぞれのテーブルを構成するフィールドの数を収集します。
Sub Sample_1_03() 'テーブル名とそのフィールド数を収集する Dim dbs As Database Dim tdf As TableDef Set dbs = CurrentDb For Each tdf In dbs.TableDefs With tdf If ((.Attributes And dbSystemObject) Or _ (.Attributes And dbHiddenObject)) = 0 Then Debug.Print .Name, Debug.Print .Fields.Count End If End With Next tdf End Sub 実行例:
![]() ![]() |
|||
|
Copyright © T'sWare All rights reserved | ![]() ![]() |