Private Sub cmdSave_Click()
On Error GoTo Err_cmdSave_Click
If Nz([dwname]) = "" Or Nz([kind]) = "" Or Nz([agent]) = "" Then
MsgBox "单位名称/单位性质/经办人不能为空!", 64, "新永旭模具"
Else
If DLookup("[dwname]", "德江县企事业单位在职职工失业保险登记汇总表", "[dwname]='" & [dwname] & "'") <> "" Then
MsgBox "代码重复,请重新输入!", 64, "温馨提示"
Me.dwname.SetFocus
Else
DoCmd.RunSQL "insert into 德江县企事业单位在职职工失业保险登记汇总表(dwname,kind,pp,dwfr,address,finance,agent,bank,number,call,dremark) select [dwname],[kind],[pp],[dwfr],[address],[finance],[agent],[bank],[number],[call],[dremark] "