<<< 返回 access911.net 编程静态资料库索引页

关系如何用VBA程序来建立

 

作者:  摘自:  录入:cg1  时间:2003-5-15  浏览人次:1596


专题地址:http://www.access911.net/index.asp?u1=a&u2=75FAB41E10DC 如果需要更详细的评论或说明,请点击该地址。

 

简述:

 


问题:


关系如何用VBA程序来建立《其他》

 


回答:

引用 dao

Sub CreateRelationX()

    Dim dbsNorthwind As Database
    Dim tdfEmployees As TableDef
    Dim tdfNew As TableDef
    Dim idxNew As Index
    Dim relNew As Relation
    Dim idxLoop As Index

    Set dbsNorthwind = OpenDatabase("Northwind.mdb")

    With dbsNorthwind
        ' Add new field to Employees table.
        Set tdfEmployees = .TableDefs!Employees
        tdfEmployees.Fields.Append _
            tdfEmployees.CreateField("DeptID", dbInteger, 2)

        ' Create new Departments table.
   .....................
...........

资料库随时有更新,欲查看最新详情请单击专题地址http://www.access911.net/index.asp?u1=a&u2=75FAB41E10DC

 


上一篇:如何更改字段类型或字段长度?

下一篇:如何获取文件版本号?

2010年7月2日生成静态资料