If e.Form.Controls("记录编号").Value = Nothing Then
MsgBox("请填写完整数据!!",64,"提示")
Else
Dim a1 As String = e.Form.Controls("记录编号").Value
Dim dr As DataRow
dr = DataTables("表A").SQLFind("记录编号 = \'" & a1 &"\' ") \'找出编号为03的产品
If dr IsNot Nothing Then \'如果找到的话
Else
Dim r1 As Row = Tables("表A").addnew()
r1("记录编号")=e.Form.controls("记录编号").text
End If
End If
是这样?