求助:在对应所需名称或序数的集合中未找到项目
图1是显示查询结果,图2是单击DataGrid1显示结果
Private Sub DataGrid1_Click()
'On Error Resume Next
With Adodc2.Recordset
If .RecordCount > 0 Then
For i = 0 To MSHFlexGrid1.Cols - 1
y = i + 1
MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, y) = Trim(.Fields(i))
DataGrid1.Visible = False
Text5.Text = ""
Call AdjustColWidth(Me, MSHFlexGrid1, True, 0)
MSHFlexGrid1.SetFocus
MSHFlexGrid1.Col = 5
Next
End If
End With
End Sub
名称应该没问题,问题应该是出在序数上;请教各位大佬帮忙看下该如何修改。
[此贴子已经被作者于2022-9-26 12:47编辑过]