Private Sub 删除_Click()
On Error GoTo Err_删除_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
DoCmd.RunSQL "Delete * FROM 员工档案表,公物配用,合同管理,备注表,工作变更,家庭成员,简历表,奖惩记录,离退职管理,培训记录 WHERE 职工编号 = 职工编号"
Exit_删除_Click:
Exit Sub
Err_删除_Click:
MsgBox err.Description
Resume Exit_删除_Click
End Sub
DoCmd.RunSQL "Delete * FROM 员工档案表 WHERE 职工编号 = 职工编号"
DoCmd.RunSQL "Delete * FROM 公物配用 WHERE 职工编号 = 职工编号"
DoCmd.RunSQL "Delete * FROM 合同管理 WHERE 职工编号 = 职工编号"
DoCmd.RunSQL "Delete * FROM 备注表 WHERE 职工编号 = 职工编号"
DoCmd.RunSQL "Delete * FROM 工作变更 WHERE 职工编号 = 职工编号"
DoCmd.RunSQL "Delete * FROM 家庭成员 WHERE 职工编号 = 职工编号"
DoCmd.RunSQL "Delete * FROM 奖惩记录 WHERE 职工编号 = 职工编号"
DoCmd.RunSQL "Delete * FROM 离退职管理 WHERE 职工编号 = 职工编号"
DoCmd.RunSQL "Delete * FROM 培训记录 WHERE 职工编号 = 职工编号"
DoCmd.RunSQL "Delete * FROM 员工档案表 WHERE 职工编号 = 职工编号.Text"
DoCmd.RunSQL "Delete * FROM 公物配用 WHERE 职工编号 = 职工编号.Text"
DoCmd.RunSQL "Delete * FROM 合同管理 WHERE 职工编号 = 职工编号.Text"
DoCmd.RunSQL "Delete * FROM 备注表 WHERE 职工编号 = 职工编号.Text"
DoCmd.RunSQL "Delete * FROM 工作变更 WHERE 职工编号 = 职工编号.Text"
DoCmd.RunSQL "Delete * FROM 家庭成员 WHERE 职工编号 = 职工编号.Text"
DoCmd.RunSQL "Delete * FROM 奖惩记录 WHERE 职工编号 = 职工编号.Text"
DoCmd.RunSQL "Delete * FROM 离退职管理 WHERE 职工编号 = 职工编号.Text"
DoCmd.RunSQL "Delete * FROM 培训记录 WHERE 职工编号 = 职工编号.Text"
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) | Powered by Discuz! X3.3 |