Function AddPrimaryKey()
'添加主键到[编号]字段
Dim strSQL As String
strSQL = "ALTER TABLE 表1 ADD CONSTRAINT PRIMARY_KEY " _
& "PRIMARY KEY (编号)"
CurrentProject.Connection.Execute strSQL
End Function
Function DropPrimaryKey()
'删除主键
Dim strSQL As String
strSQL = "ALTER TABLE 表1 Drop CONSTRAINT PRIMARY_KEY "
CurrentProject.Connection.Execute strSQL
End Function