我在读取DataGrid1中的数据时,出现了很郁闷的情况:
If i > 0 Then
For j = 0 To i - 1 Step 1
With Me.DataGrid1
.Col = 2
.Row = j
Text3.Text = Text3.Text + .Text
MsgBox Text3.Text
End With
Next j
For j = 0 To i - 1 Step 1
With Me.DataGrid1
.Row = j
.Col = 1
Text4.Text = Text4.Text + .Text
End With
Next j
end if
其中text3.text中把DataGrid1每一个记录的Col = 2的数据都读出来了,但是text4.text中却没有读出来,一般是排在前面的记录没有读出来,特别是数据较多,有滚动条时。
请各位帮帮我呀----谢谢//////
如果换成直接操作数据源,当然可以解决问题,那样也不是很好的,请大家继续就DataGrid1
中数据读取讨论一下。也欢迎大家提供新的方法,有代码最好!--谢谢
If i > 0 Then
For j = 0 To i - 1 Step 1
With Me.DataGrid1
.Col = 2
.Row = j
Text3.Text = Text3.Text + .Text
MsgBox Text3.Text
End With
Next j
For j = 0 To i - 1 Step 1
With Me.DataGrid1
.Row = j
.Col = 1
Text4.Text = Text4.Text + .Text
End With
Next j
end if
其中text3.text中把DataGrid1每一个记录的Col = 2的数据都读出来了,但是text4.text中却没有读出来,一般是排在前面的记录没有读出来,特别是数据较多,有滚动条时。
请各位帮帮我呀----谢谢//////
如果换成直接操作数据源,当然可以解决问题,那样也不是很好的,请大家继续就DataGrid1
中数据读取讨论一下。也欢迎大家提供新的方法,有代码最好!--谢谢
With Me.DataGrid1
.Col = 2
.Row = j
Text3.Text = Text3.Text + .Text
.COL=1
Text4.Text = Text4.Text + .Text
End With