If MsgBox("请确定是否删除该科室?", 4 + 32, "证件发放管理") = 6 Then
If Not IsNull(DLookup("[科室代码]", "jkzb", "[科室代码] = Forms!科室设置!dm")) Then
MsgBox "该科室已经使用不能删除!", vbInformation, "证件发放管理"
Else
DoCmd.RunSQL "DELETE 科室.* from 科室 WHERE 代码 = forms!科室设置!dm;"
kssz.RowSource = "SELECT [科室].[代码], [科室].[科室] FROM 科室; "
Me!dm = ""
Me!ks = ""
save.Enabled = False
End If
Else
End If