表现为,当有移除行时(删除几行,添加行时就会少几行),如果没有移除行操作,就不会有这种现象!望老鸟帮小鸟解决此问题!谢谢!
以下是显示表格数据代码:
With msfgrid
If rs.RecordCount > 0 Then
If .Rows = 2 Then
For i = 1 To 4
cs = cs & .TextMatrix(1, i)
Next i
If Len(cs) = 0 Then
.Rows = rs.RecordCount + 1
For j = 1 To rs.RecordCount
For i = 1 To 9
Select Case i
Case 1, 2, 3, 4, 5, 6
.TextMatrix(j, i) = rs.Fields(i - 1) & ""
Case 8
.TextMatrix(j, i) = Format(rs.Fields(i - 2) & "", "0.00")
End Select
Next i
rs.MoveNext
Next j
cs = ""
End If
Else
.Rows = .Rows + rs.RecordCount
For j = (.Rows - rs.RecordCount) To (.Rows - 1)
For i = 1 To 9
Select Case i
Case 1, 2, 3, 4, 5, 6
.TextMatrix(j, i) = rs.Fields(i - 1) & ""
Case 8
.TextMatrix(j, i) = Format(rs.Fields(i - 2) & "", "0.00")
End Select
Next i
rs.MoveNext
Next j
End If
End If
.Col = 7
.Row = 1
If .TextMatrix(1, 1) <> "" Then
msfgrid_Click
Else
.Col = 0
.Row = 0
End If
End With
rs.Close
End Sub
以下是删除行代码:
If msfgrid.Rows = 2 Then: msfgrid.Clear: Call showfix: Else: msfgrid.RemoveItem
表现为,当有移除行时(删除几行,添加行时就会少几行),如果没有移除行操作,就不会有这种现象!望老鸟帮小鸟解决此问题!谢谢!
以下是显示表格数据代码:
With msfgrid
If rs.RecordCount > 0 Then
If .Rows = 2 Then
For i = 1 To 4
cs = cs & .TextMatrix(1, i)
Next i
If Len(cs) = 0 Then
.Rows = rs.RecordCount + 1
For j = 1 To rs.RecordCount
For i = 1 To 9
Select Case i
Case 1, 2, 3, 4, 5, 6
.TextMatrix(j, i) = rs.Fields(i - 1) & ""
Case 8
.TextMatrix(j, i) = Format(rs.Fields(i - 2) & "", "0.00")
End Select
Next i
rs.MoveNext
Next j
cs = ""
End If
Else
.Rows = .Rows + rs.RecordCount
For j = (.Rows - rs.RecordCount) To (.Rows - 1)
For i = 1 To 9
Select Case i
Case 1, 2, 3, 4, 5, 6
.TextMatrix(j, i) = rs.Fields(i - 1) & ""
Case 8
.TextMatrix(j, i) = Format(rs.Fields(i - 2) & "", "0.00")
End Select
Next i
rs.MoveNext
Next j
End If
End If
.Col = 7
.Row = 1
If .TextMatrix(1, 1) <> "" Then
msfgrid_Click
Else
.Col = 0
.Row = 0
End If
End With
rs.Close
End Sub
以下是删除行代码:
If msfgrid.Rows = 2 Then: msfgrid.Clear: Call showfix: Else: msfgrid.RemoveItem
表现为,当有移除行时(删除几行,添加行时就会少几行),如果没有移除行操作,就不会有这种现象!望老鸟帮小鸟解决此问题!谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货