data1.updaterecord 时会发生数据类型转换错误.txt
来自「以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题」· 文本 代码 · 共 14 行
TXT
14 行
你 可 以 这 样 做 :
Private Sub Data1_Validate(Action As Integer, Save As Integer)
If Text1.DataChanged And Text1.Text = "" Then
Text1.DataChanged = False 'So this data is not saved
Data1.UpdateRecord ' This saves the data that
' may have changed in the other controls
' Now clear the numeric field
Data1.Recordset.Edit
Data1.Recordset![Year Born] = Null
Data1.Recordset.Update
End If
End Sub
<END>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?