是这样吗?貌似还是报错
Dim dr As DataRow = DataTables("客户黑名单").find("客户='" & e.form.controls("客户").text & "'")
If dr IsNot Nothing Then
msgbox("黑名单客户,无法登记")
Return
End If
If e.form.controls("机器型号").text = "" Then
Messagebox.Show("机器型号不能为空!")
Return
End If
Dim r1 As Row = Tables("检测维修单").addnew
Dim r2 As Row = Tables("技术支持部总表").addnew
r1("客户")= e.form.controls("客户").text
r2("客户")= e.form.controls("客户").text
r1("联系方式")= e.form.controls("联系方式").text
r2("联系方式")= e.form.controls("联系方式").text
r1("型号")= e.form.controls("机器型号").text
r2("机器型号")= e.form.controls("机器型号").text
r1("故障")= e.form.controls("故障现象描述").text
r2("故障现象描述")= e.form.controls("故障现象描述").text
r1("接修日期")= e.form.controls("返厂时间").text
r2("检测时间")= e.form.controls("检测时间").text
r1("保修状态")= e.form.controls("保修状态").text
r2("保修状态")= e.form.controls("保修状态").text
r1("维修完成时间")= e.form.controls("维修时间").text
r2("维修完成时间")= e.form.controls("维修时间").text
r1("维修员")= e.form.controls("维修员").text
r2("维修员")= e.form.controls("维修员").text
r1("发货时间")= e.form.controls("发货时间").text
r2("发货时间")= e.form.controls("发货时间").text
r1("修品类别")= e.form.controls("维修类型").text
r2("维修类型")= e.form.controls("维修类型").text
r1("序列号")= e.form.controls("机器条码").text
r2("机器条码")= e.form.controls("机器条码").text
r1("分值")= e.form.controls("分值").text
r2("分值")= e.form.controls("分值").text
r2("备注")= e.form.controls("备注").text
r2("返厂日期")= e.form.controls("返厂时间").text
r2("维修周期")= e.form.controls("维修周期").text
r2("使用行业")= e.form.controls("使用行业").text
r2("运行状态")= e.form.controls("运行状态").text
r2("外围损坏")= e.form.controls("外围损坏").text
r2("工作环境")= e.form.controls("工作环境").text
r2("备注一")= e.form.controls("备注一").text
r2("收费情况")= e.form.controls("收费情况").text
r2("损坏元件详细清单")= e.form.controls("损坏元件详细清单").text
r2("机器运行时间")= e.form.controls("机器运行时间").text
r2("更换部件清单")= e.form.controls("更换部件清单").text
r2("内部参数_故障记录一")= e.form.controls("故障记录一").text
r2("内部参数_故障记录二")= e.form.controls("故障记录二").text
r2("内部参数_故障记录三")= e.form.controls("故障记录三").text
r2("内部参数_故障电流")= e.form.controls("故障电流").text
r2("内部参数_其他参数")= e.form.controls("其他参数").text
r2("维修状况")= e.form.controls("维修状况").text
r2("维修状况原因")= e.form.controls("维修原因").text
r2("备注二")= e.form.controls("备注二").text
r2("检查结果及损坏原因分析")= e.form.controls("检查结果及损坏原因分析").text
r2("问题追溯_设计问题")= e.form.controls("设计问题").text
r2("问题追溯_材料问题")= e.form.controls("材料问题").text
r2("问题追溯_制程问题")= e.form.controls("制程问题").text
r2("问题追溯_应用问题")= e.form.controls("应用问题").text
r2("问题追溯_其他故障原因")= e.form.controls("其他故障原因").text
r2("检测人")= e.form.controls("检测人").text
r2("发货人")= e.form.controls("发货人").text
e.form.controls("客户").text = ""
e.form.controls("联系方式").text = ""
e.form.controls("机器型号").text = ""
e.form.controls("故障现象描述").text = ""
e.form.controls("检测时间").text = ""
e.form.controls("保修状态").text = ""
e.form.controls("维修时间").text = ""
e.form.controls("维修员").text = ""
e.form.controls("发货时间").text = ""
e.form.controls("维修类型").text = ""
e.form.controls("机器条码").text = ""
e.form.controls("分值").text = ""
e.form.controls("联系方式").text = ""
e.form.controls("机器型号").text = ""
e.form.controls("故障现象描述").text = ""
e.form.controls("检测时间").text = ""
e.form.controls("保修状态").text = ""
e.form.controls("维修时间").text = ""
e.form.controls("维修员").text = ""
e.form.controls("发货时间").text = ""
e.form.controls("维修类型").text = ""
e.form.controls("机器条码").text = ""
e.form.controls("分值").text = ""
e.form.controls("备注").text = ""
e.form.controls("返厂时间").text = ""
e.form.controls("维修周期").text = ""
e.form.controls("使用行业").text = ""
e.form.controls("运行状态").text = ""
e.form.controls("外围损坏").text = ""
e.form.controls("工作环境").text = ""
e.form.controls("备注一").text = ""
e.form.controls("收费情况").text = ""
e.form.controls("损坏元件详细清单").text = ""
e.form.controls("机器运行时间").text = ""
e.form.controls("更换部件清单").text = ""
e.form.controls("故障记录一").text = ""
e.form.controls("故障记录二").text = ""
e.form.controls("故障记录三").text = ""
e.form.controls("故障电流").text = ""
e.form.controls("其他参数").text = ""
e.form.controls("维修状况").text = ""
e.form.controls("维修原因").text = ""
e.form.controls("备注二").text = ""
e.form.controls("检查结果及损坏原因分析").text = ""
e.form.controls("设计问题").text = ""
e.form.controls("材料问题").text = ""
e.form.controls("制程问题").text = ""
e.form.controls("应用问题").text = ""
e.form.controls("其他故障原因").text = ""
e.form.controls("检测人").text = ""
e.form.controls("发货人").text = ""