Private Sub Cmd删除记录_Click()
Dim tixing As String
Dim MM As String
Dim CC As Integer
Forms![员工档案]![员工简况].SetFocus
MM = Forms![员工档案]![员工简况]![姓名].Value
CC = DCount("姓名", "员工流动", "姓名='" & MM & "'")
MsgBox (CC)
If CC = 0 Then
DoCmd.OpenForm ("员工")
Forms!员工.Filter = "姓名='" & MM & "'"
Forms!员工.FilterOn = True
Forms!员工.Requery
Forms![员工].SetFocus
Forms![员工]!Child169!流动类型.Locked = False
Else
End If
Forms![员工档案]![员工简况].SetFocus
tixing = MsgBox(" 真得要从在册库中删除" & Chr(13) & Chr(10) & Chr(10) & " " & MM & Chr(13) & Chr(10) & Chr(10) & " 并将其存入减少库吗?", 1, "警告!")
If tixing = 1 Then
CurrentDb.Execute "INSERT INTO [减少员工流动] SELECT * FROM [员工流动] where [员工流动]![姓名]='" & MM & "';"
;"
-------------------------------------------
Else
End If
Forms![员工档案]![员工简况].Requery