Dim rst As TableDef
Dim prpLoop As Property
Set rst = CurrentDb.TableDefs("BB")
For Each prpLoop In rst.Properties
If prpLoop <> "" Then Debug.Print " " & prpLoop.Name & " = " & prpLoop
Next prpLoop
斑竹:
1.有引用DAO3.6
2.存在BB表
3.用了Currentdb()也不是,錯誤同上...
4.另外,我用
Dim rst As TableDef
Dim prpLoop As Property
Set rst = CurrentDb.TableDefs("BB")
MsgBox CurrentDb.TableDefs("bom1").Name '===>這句不會出錯...,正確