VB6更新错误Sheridan网格
我正在对另一个开发人员编写的程序进行一些更改,该程序使用SSDB网格 我正在为VB6更新错误Sheridan网格,vb6,Vb6,我正在对另一个开发人员编写的程序进行一些更改,该程序使用SSDB网格 我正在为BeforeUpdate方法编写代码 On Error GoTo BeforeUpdate_Err Dim ans% ans% = MsgBox("These changes will be committed to the database. These changes cannot be undone. " & _ "Would you like to conti
BeforeUpdate
方法编写代码
On Error GoTo BeforeUpdate_Err
Dim ans%
ans% = MsgBox("These changes will be committed to the database. These changes cannot be undone. " & _
"Would you like to continue?", vbYesNo, "Confirm Changes")
If ans% = 7 Then
Grd_Collection.CancelUpdate
End If
Exit Sub
BeforeUpdate_Err:
MsgBox (Err.Description)
网格的唯一其他代码是InitColumnProps
方法
On Error GoTo BeforeUpdate_Err
Dim ans%
ans% = MsgBox("These changes will be committed to the database. These changes cannot be undone. " & _
"Would you like to continue?", vbYesNo, "Confirm Changes")
If ans% = 7 Then
Grd_Collection.CancelUpdate
End If
Exit Sub
BeforeUpdate_Err:
MsgBox (Err.Description)
但是,在点击退出子行后,我收到一条错误消息“Update error”
我已经搜索了这个硬编码的代码,但它不是,所以它来自网格
导致错误的原因是什么?如何修复它?BeforeUpdate方法是否传递整数<代码>(取消为整数)还是什么 因此,您应该能够将代码更改(并整理)为: