已经做了转换,还是提示字符不能保存为双精度小数:
Dim txt As WinForm.TextBox = e.Form.Controls("TextBox1")
Dim str As String = txt.text
Dim txt1 As WinForm.TextBox = e.Form.Controls("TextBox8")
Dim str1 As String = txt1.text
Dim txt2 As WinForm.TextBox = e.Form.Controls("TextBox15")
Dim str2 As String = txt2.text
Dim txt3 As WinForm.TextBox = e.Form.Controls("TextBox22")
Dim str3 As String = txt3.text
Dim ytxt As WinForm.TextBox = e.Form.Controls("TextBox4")
Dim ystr As String = ytxt.text
Dim ytxt1 As WinForm.TextBox = e.Form.Controls("TextBox11")
Dim ystr1 As String = ytxt1.text
Dim ytxt2 As WinForm.TextBox = e.Form.Controls("TextBox18")
Dim ystr2 As String = ytxt2.text
Dim ytxt3 As WinForm.TextBox = e.Form.Controls("TextBox25")
Dim ystr3 As String = ytxt3.text
If usna Like "*总经理*" Or usna="admin" Then
For Each dr As Row In Tables("报价单").Rows
dr("订单量")=CDbl(str)
dr("订单量1")=CDbl(str1)
dr("订单量2")=CDbl(str2)
dr("订单量3")=CDbl(str3)
dr("利润点")=CDbl(ystr)
dr("利润点1")=CDbl(ystr1)
dr("利润点2")=CDbl(ystr2)
dr("利润点3")=CDbl(ystr3)
If dr IsNot Nothing Then
If dr("订单量") ="" Or dr("订单量1") ="" Or dr("订单量2") ="" Or dr("订单量3") ="" Then
MessageBox.show("不能记录""订单量""为空的报价","提示")
Return
End If
dr.save()
End If
Next
Else
MessageBox.show("你无权执行此项操作!")
End If
[此贴子已经被作者于2018/8/1 9:57:21编辑过]