#12006/2/20 19:53:53
各位先生你们好!
我在如下编码运行总出现错误提示,为“定义了过多的字段”。且分部运行试验时走到rs_zhutong.MoveFirst时,就跳到 MsgBox Err.Description上,而把中间都隔过去了,这是为什么?如何解决哪?谢谢诸位高人指点、帮忙呀!谢谢
杨-
Private Sub cmdDel_Click()
Dim answer As String
Dim delete_row As String
On Error GoTo delerror
answer = MsgBox("确实要删除", vbYesNo + vbQuestion)
If answer = vbYes Then
rs_zhutong.MoveFirst
Dim i As Integer
For i = 0 To rs_zhutong.RecordCount - 1
If rs_zhutong.Fields(0) = Text1.Text Then
rs_zhutong.Delete
rs_zhutong.Update
MsgBox "删除成功¡", vbOKOnly + vbExclamation, "OK"
With grdLoupan
.RemoveItem getrow
End With
Exit Sub
End If
rs_zhutong.MoveNext
Next i
Else
Exit Sub
End If
Exit Sub
delerror:
MsgBox Err.Description
End Sub